Community Patterns

Community Library Entry

1

Regular Expression
Created·2018-01-08 23:29
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