Title |
Test
Find
Split SQL UPDATE statement
|
Expression |
(UPDATE\s+)(\w+)\s+(SET)\s+([\w+\s*=\s*\w+,?\s*]+)\s+(WHERE.+) |
Description |
Use with "/i" flag (case-insensitive) to match any valid SQL UPDATE statement, and to parse it into it's component parts. Most useful will be group $2, the table name, group $4, the field=value list, and group $5, the WHERE clause. |
Matches |
UPDATE table1 SET field1=value1,field2=value WHERE field4=value4 |
Non-Matches |
UPDATE table1 SET field1=value1,field2=value |
Author |
Rating:
Not yet rated.
Benjamin Nelson
|
Source |
TxITGuy |
Your Rating |
|
Title: RE: Test Find Split SQL UPDATE statement
Name: Awateru
Date: 9/30/2009 6:52:44 PM
Comment:
This doesn't match any valid SQL update statement as WHERE is optional, such as updating all binary fields for all lines to true, etc..