Regex.REFlags3kaya
Flags for regular expression compilation
Usage
Regex::REFlags< >
-
=
IgnoreCase()
-
|
Extended()
-
|
Multiline()
-
|
Ungreedy()
Overview
Flags for regular expression compilation
-
- IgnoreCase makes the expression case-insensitive (so "^a" would match "All" and "all"
-
- Extended when set causes whitespace in the pattern (other than in a character class) and characters between a '#' outside a character class and the next newline character to be ignored. An escaping backslash can be used to include a whitespace or '#' character as part of the pattern.
-
- Multiline changes the meaning of the start '^' and end '$' characters so that as well as matching the start and end of the string, they will also match immediately after and immediately before a newline '\n' character.
-
- Ungreedy causes the expression and sub-expressions to find the smallest possible match, rather than the largest possible, unless a '?' is placed after the expression. For example, the pattern "a.*a" would match "aca" if ungreedy, and "acada" if greedy in the string "bacadaf".
Releases
4 releases since Debian 5.0 (Lenny); the text changed 3 times.