Regular Expressions 101

Community Patterns

EX: Regex for check has dangerours SQL

0

Regular Expression
PCRE (PHP <7.3)

/
(_id`|\.`id`)\s*(!?=\s*\d+|IN\s*\([\d\,\s]*\))|FOR UPDATE|`ancestry`\s*(=|LIKE)\s*'.*'
/
g

Description

Check whether or not the SQL is dangerous!

Submitted by anonymous - 4 years ago