Regular Expressions 101

Community Patterns

Escaped Character Finder

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 - 3 years ago