Appendix 4. Perl Compatible Regular Expressions
|
1. | Those that are recognized anywhere in the pattern except within square brackets;
|
2. | Those that are recognized in square brackets.
|
\
|
general escape character with several uses, more detailed description is given later
|
^
|
assert start of subject (or line, in multiline mode)
|
$
|
assert end of subject (or line, in multiline mode)
|
.
|
character class containing all characters; match any character except newline
|
[...]
|
character class definition. Matches any of bracketed characters
|
|
|
meta-character "OR": allows joining several patterns into one set of alternative matches
|
(...)
|
delimit subpattern within general match pattern
|
?
|
match 1 non-alphanumeric character
|
*
|
match 0 or more of any characters, specified on the left
|
+
|
match 1 or more of any characters, specified on the left
|
{min, max}
|
minimum/maximum quantifier: require minimum occurrences, allow maximum occurrences.
|
\
|
general escape character
|
^
|
negate the class, but only if the first character of class definition, any characters but those in class will match
|
-
|
indicates character range
|
[...]
|
terminates the character class
|
Copyright © 19972021 Art. Lebedev Studio | http://www.artlebedev.com | Last updated: 29.03.2011 |