Community Patterns

Community Library Entry

0

Regular Expression
Created·2021-05-19 06:23
Flavor·PCRE2 (PHP)

/
^\{[\s]*\"(tab1|tab3|tab5)".*
/
gm
Open regex in editor

Description

Regex for checking if JSON starts with desired keys Useful for validating/filtering database entries when used in combination with SQL Like

Example:

Postgre: select * from table_name where column_json ~ '^{[\s]"(tab1|tab3|tab5)".'

Submitted by MUA