Skip to main content

Posts

Showing posts with the label CSV regex for postgres

Regex to parse PostgreSQL CSV log files.

It took sometime to me to understand the powerful concept, i.e, REGEX. Below is the REGEX expression to parse the CSV log files, which have been generated by PostgreSQL. Regex is :- -=-=-=-=-= "^((([^, \"\n\r ]*)|( \" ([^ \" ]|( \"\" ))* \" )),){22}( \" ([^ \" ]|( \"\" ))* \" [ \r\n ]+)" Use any regex tools like RegexBuddy, which will give you detailed information about this regular expression. Dinesh Kumar