Feature: Lookahead
Home | Features | Improve this section
A Lookahead is a zero-width assertion that matches if the provided pattern would match the characters to the right of the current position.
Syntax
NOTE: The following syntax is an example based on some of the supported engines. For specific engine support, see Engines.
(?=…)— Positive Lookahead. Matches if the provided pattern would match but does not advance the current position.(?!…)— Negative Lookahead. Matches if the provided pattern would not match, but does not advance the current position.
Engines
| Engine | Supported |
|---|---|
| Perl | ✔ |
| PCRE | ✔ |
| Boost.Regex | ✔ |
| .NET | ✔ |
| Oniguruma | ✔ |
| Hyperscan | ❌ |
| ICU | ✔ |
| Glib/GRegex | ✔ |
| ECMAScript | ✔ |