Regular Expressions 101

Community Patterns

Community Library Entry

25

Regular Expression
ECMAScript (JavaScript)

/
(["'])((?:(?=(?:\\)*)\\.|.)*?)\1
/
gm

Description

Matches text within quotes (", ') and escapes the charecters.

Submitted by Vihan Bhargava - 10 years ago