Feature: Modifiers
Home | Features | Improve this section
Modifiers allow you to change the currently active RegExp flags within a subexpression.
Syntax
NOTE: The following syntax is an example based on some of the supported engines. For specific engine support, see Engines.
(?imsx-imsx)
- Sets or unsets (using-
) the specified RegExp flags starting at the current position until the next closing)
or the end of the pattern. Example:(?-i)A(?i)B(?-i)C
matchesABC
,AbC
.(?imsx-imsx:…)
- Sets or unsets (using-
) the specified RegExp flags for the subexpression. Example:(?-i:A(?i:B)C)
matchesABC
,AbC
.
Engines
Engine | Supported |
---|---|
Perl | ✔ |
PCRE | ✔ |
Boost.Regex | ✔ |
.NET | ✔ |
Oniguruma | ✔ |
Hyperscan | ✔ |
ICU | ✔ |
Glib/GRegex | ✔ |
ECMAScript | ❌ |