|
|
|||
|
|
| RegularExpression["regex"] represents the generalized regular expression specified by the string "regex". |
| c | the literal character c | |
| . | any character except newline | |
| [c1c2...] | any of the characters ci | |
| [c1-c2] | any character in the range c1-c2 | |
| [^c1c2...] | any character except the ci | |
| p* | p repeated zero or more times | |
| p+ | p repeated one or more times | |
| p? | zero or one occurrence of p | |
| p{m,n} | p repeated between m and n times | |
| p*?,p+?,p?? | the shortest consistent strings that match | |
| (p1p2...) | strings matching the sequence p1, p2, ... | |
| p1|p2 | strings matching p1 or p2 |
| \\d | digit 0-9 | |
| \\D | nondigit | |
| \\s | space, newline, tab or other whitespace character | |
| \\S | nonwhitespace character | |
| \\w | word character (letter, digit or _) | |
| \\W | nonword character | |
| [[:class:]] | characters in a named class | |
| [^[:class:]] | characters not in a named class |
| ^ | the beginning of the string (or line) | |
| $ | the end of the string (or line) | |
| \\b | word boundary | |
| \\B | anywhere except a word boundary |
| (?i) | treat uppercase and lowercase as equivalent (ignore case) | |
| (?m) | make ^ and $ match start and end of lines (multiline mode) | |
| (?s) | allow . to match newline | |
| (?-c) | unset options |