
January 4th, 2003, 10:10 PM
|
|
Contributing User
|
|
Join Date: Aug 2002
Posts: 232
Time spent in forums: < 1 sec
Reputation Power: 8
|
|
|
Regexp help, tough problem
Ok, I need to parse a WHERE clause being passed into a function. The string containing it could be something like..
where = "username = 'test', password = 'somehash', email = 'this@that.theother.thing'"
I have addslashes/stripslashes that I wrote to make my SQL strings safe from fishy user input. The problem is, I dont' wanna rewrite these functions. I've managed to get a regexp to grab the values from inside the single quotes and escape them, but reassembling the whole string has proven not so simple.
This is in visual basic 6, btw, using vbscript regexp library 5.0
|