Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
Created·2020-11-19 09:02
Flavor·PCRE (Legacy)

/
["'`](?:(?<=")[^"\\]*(?s:\\.[^"\\]*)*"|(?<=')[^'\\]*(?s:\\.[^'\\]*)*'|[^`]*`)
/
g
Open regex in editor

Description

Verbose, somewhat cryptic and very efficient pattern to match all text inside of quotes and MySQL identifier tokens.

Submitted by Phillip Weber