Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE2 (PHP >=7.3)

/
\\{2}(*SKIP)(?(R)|\\[^\\])|\\[^\\]
/
g

Description

Flavor: PCRE2

Finds escaped characters. No matter how many \ are present, it will always match either \. or . (where . is the character).

Submitted by Grayson Spidle - 4 years ago