Alternatives
-
- Last UpdatedMar 14, 2025
- 1 minute read
Alternatives occur when the expression can match either one subexpression or another. The alternatives are separated by "|
", or "\|
".
The scope of an alternative is the largest possible previous sub-expression.
Note: This behavior is exactly the opposite of that of repeat operators, whose scope is the smallest previous sub-expression. |