Feature: Comments
Home | Features | Improve this section
A Comment is a sequence of characters that is ignored by pattern matching and can be used to document a pattern.
Syntax
NOTE: The following syntax is an example based on some of the supported engines. For specific engine support, see Engines.
(?#…)
— The entire expression is removed from the pattern. A comment may not contain other(
or)
characters.
Engines
Engine | Supported |
---|---|
Perl | ✔ |
PCRE | ✔ |
Boost.Regex | ✔ |
.NET | ✔ |
Oniguruma | ✔ |
Hyperscan | ✔ |
ICU | ✔ |
Glib/GRegex | ✔ |
ECMAScript | ❌ |