05-30-2008, 11:27 PM
|
#5 (permalink)
|
|
Moderateur
Join Date: Apr 2007
Posts: 1,393
Thanks: 5
|
Adding the ability to have whitespace in the two character classes, combined with using the x modifier, would help. In order to match line breaks you have to tell the regex engine where to expect them, there's no magic allow/disallow switch.
Code:
/(
((SELECT|DELETE) [A-Za-z0-9-\*,`._\s]+ FROM)
|
(INSERT INTO)
|
(UPDATE [A-Za-z0-9-\*,`._\s]+ SET)
)/x
|
|
|
|