Community Patterns

Community Library Entry

0

Regular Expression
Created·2022-12-04 05:18
Flavor·PCRE2 (PHP)

/
(?<!XXY)(?<=Y)\w(?=Y)(?!YYXX)
/
gm
Open regex in editor

Description

An example of lookahead and lookbehind, both negative and positive. Allows to limit matches within specified limits without capture groups

Submitted by CAMOKPYT