Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Once you have constructed a regular expression, it is evaluated much like an arithmetic expression, that is, it is evaluated from left to right and follows an order of precedence.
Operator(s) |
Description |
---|---|
\ |
Escape |
(), (?:), (?=), [] |
Parentheses and Brackets |
*, +, ?, {n}, {n,}, {n,m} |
Quantifiers |
^, $, \anymetacharacter |
Anchors and Sequences |
| |
Alternation |
Characters have higher precedence than the alternation operator, which allows 'm|food' to match "m" or "food". To match "mood" or "food", use parentheses to create a subexpression, which results in '(m|f)ood'.