Feature: Flags
Home | Features | Improve this section
Flags control certain aspects of the matching behavior of a pattern.
Syntax
NOTE: The following syntax is an example based on some of the supported engines. For specific engine support, see Engines.
The following flags are supported:
i
— Ignore Case. Matches character classes using a case-insensitive comparison.m
— Multiline. Causes the anchors^
and$
to match the start and end of each line (respectively), rather than the start and end of the input.s
— Singleline. Causes the wildcard.
to match newline characters.x
— Extended Mode. Ignores whitespace in a pattern. Spaces must instead be represented by\s
or\
(an escaped space).
Engines
Engine | Supported |
---|---|
Perl | ✔ |
PCRE | ✔ |
Boost.Regex | ✔ |
.NET | ✔ |
Oniguruma | ✔ |
Hyperscan | ✔ |
ICU | ✔ |
Glib/GRegex | ✔ |
ECMAScript | ✔ |