Community Patterns

Community Library Entry

0

Regular Expression
Created·2021-01-14 14:43
Flavor·PCRE (Legacy)

/
(['""])((?:\\1|(?:(?!\1)).)*)(\1)|(?<OpenMatch>({))|(?<CloseMatch>(}))
/
gm
Open regex in editor

Description

This Regular expression is applicable to all string literals. If we want to match character outside those strings, then just need to add that character in rest of the groups.

Submitted by anonymous