Hello
I have to parse a SQL INSERT statement to get all the values to include in the database.
I thought that a regex should exist to do this, and I found this very nice regex (http://regexlib.com/REDetails.aspx?regexp_id=1750) :
(INSERT INTO\s+)(\w+)(\s+\()([\w+,?\s*]+)(\)\s+VALUES\s+)((\(['?\w+'?,?\s*]+\)\,?;?\s*)+)
Unfortunately, it doesn't work with values containing other characters than letters.
For exemple this insert request does not match : INSERT INTO my_table (id, file) VALUES (1, 'file.java');
Could you tell me how change the regex to match with values containing other characters than letters (for exemple : ' , . - < > ( ) ) ?
Thanks a lot for your help !