On this page:
rx/  and
rx/  &
rx/  or-operator
rx/  or

2 And and Or🔗ℹ

The most primitive combination operators, and and or. In regular expressions and-ing two sub-expressions simply concatenates them.

procedure

(rx/and expr ...+)  string?

  expr : string?

procedure

(rx/& expr ...+)  string?

  expr : string?
Returns a new expression that concatenates the list of sub-expressions in expr. The function rx/& is simply an alias for rx/and.

Examples:
> (rx/and "a" "b" "cd")

"abcd"

> (rx/& "a" "b" "cd")

"abcd"

The operator that separates sub-expressions or-ed together.

procedure

(rx/or expr ...+)  string?

  expr : string?
Returns a new expression that combines the list of sub-expressions in expr separated by the rx/or-operator.

Example:
> (rx/or "a" "b" "cd")

"a|b|cd"