Regular Expressions 101

Community Patterns

Inside single quotes, escape aware

1

Regular Expression
PCRE (PHP <7.3)

/
'((?:\\.|[^'])*+)'
/
gm

Description

Allows the single quote to be escaped, handles the \' situation

Submitted by Robin - 10 years ago