Negative lookahead
(?!...)Starting at the current position in the expression, ensures that the given pattern will not match. Does not consume characters.
Examples
Match Sample:
foobar foobaz
Regex Example:
foo(?!bar)
PCRE JAVASCRIPT PYTHON
Share & Embed
Use this snippet to display this token on your own site.
<!-- Embed Regex Token: (?!...) --> <code class="regex-token">(?!...)</code> - Negative lookahead <small><a href="https://testregex.com/cheatsheet/negative-lookahead">See details</a></small>