Regular expressions pcre2 · Lookahead and lookbehind

Match only if followed by something

Match a number only when it is followed by px, without including px in the match.

\d+(?=px)

Official Regular expressions pcre2 documentation

More lookahead and lookbehind commands

All lookahead and lookbehind commands · Regular expressions pcre2 cheatsheet

Was this page helpful?