Regex::REFlags
Constructors
- IgnoreCase()
- Extended()
- Multiline()
- Ungreedy()
Usage
Flags for regular expression compilation
IgnoreCasemakes the expression case-insensitive (so "^a" would match "All" and "all"Extendedwhen 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.Multilinechanges 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.Ungreedycauses 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".