Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE (PHP <7.3)

/
(["'])((?:\\\1|(?!\1).)+)\1
/
g

Description

Get everything inside single/double quotes and ignoring escaped ones

Submitted by Jerry - 11 years ago