Monthly Archives: August 2008

Parsing SQL Statements With Regex

I was trying to parse a SQL script the other day with regular expressions to extract some values of some columns. The script looked something like this: NSERT INTO wp_posts (ID, post_author, post_date, post_content, post_title) VALUES (5, 1, ’2008-02-03 20:06:31′, ‘marco”s long text’, ‘hello world’); so I had a regular expression that would capture anything [...]