Regular Expressions 101

Community Patterns

1...34567...901

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

/
( \( # Match all but characters `\`, `(` or `)` (?> [^\\()] | \\. | (?1) )* \) )
/
gx

Description

Escaped characters should be ignored, hence \( and \) should not affect braces.

Submitted by anonymous - 8 years ago