Operators
Operator | Description |
---|---|
| Alternation. |
| Match 0 or more times. Match as many times as possible. |
| Match 1 or more times. Match as many times as possible. |
| Match zero or one times. Prefer one. |
| Match exactly n times. |
| Match at least n times. Match as many times as possible. |
| Match between |
| Match 0 or more times. Match as few times as possible. |
| Match 1 or more times. Match as few times as possible. |
| Match zero or one times. Prefer zero. |
| Match exactly |
| Match at least |
| Match between |
| Match 0 or more times. Match as many times as possible when first encountered, do not retry with fewer even if overall match fails (Possessive Match). |
| Match 1 or more times. Possessive match. |
| Match zero or one times. Possessive match. |
| Match exactly |
| Match at least |
| Match between |
| Capturing parentheses. Range of input that matched the parenthesized subexpression is available after the match. |
| Non-capturing parentheses. Groups the included pattern, but does not provide capturing of matching text. Somewhat more efficient than capturing parentheses. |
| Atomic-match parentheses. First match of the parenthesized subexpression is the only one tried; if it does not lead to an overall pattern match, back up the search for a match to a position before the " |
| Free-format comment ( |
| Look-ahead assertion. True if the parenthesized pattern matches at the current input position, but does not advance the input position. |
| Negative look-ahead assertion. True if the parenthesized pattern does not match at the current input position. Does not advance the input position. |
| Look-behind assertion. True if the parenthesized pattern matches text preceding the current input position, with the last character of the match being the input character just before the current position. Does not alter the input position. |
| Negative Look-behind assertion. True if the parenthesized pattern does not match text preceding the current input position, with the last character of the match being the input character just before the current position. Does not alter the input position. |
| Flag settings. Evaluate the parenthesized expression with the specified flags enabled or -disabled. |
| Flag settings. Change the flag settings. Changes apply to the portion of the pattern following the setting. For example, |
Related Pages: