Red Squirrel Stumblog RSS

Dave Hoover stumbles through technology

Feb
22nd
Fri
permalink

TextMate regex for removing newlines in CSV

Find: (,"[^"]+)\n([^"]+")
Replace: $1 $2
This will need to be run repeatedly until it doesn’t match anymore because it only removes one newline from a field at a time and some fields may have multiple newlines.