Regular Expressions 101

Community Library Entry

25

Regular Expression
ECMAScript (JavaScript)

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

Description

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

Submitted by Vihan Bhargava - 9 years ago