Friday, 23 August 2013

Batch converting straight quotes to smart quotes from MySQL database

Batch converting straight quotes to smart quotes from MySQL database

I have a MySQL table with about 250 blog entries, all using straight
quotes (" and ') instead of smart quotes (" " and ' '). I need to take
those entries and somehow do a batch find-and-replace to replace all
straight quotes with smart quotes. Problem is these fields also contain
HTML, so I need to ensure all quotes within <> tags are ignored.
I've exported the appropriate fields and opened up in Sublime Text
thinking I could do regex find-and-replace. It's there that I hit a wall,
though.
Suggestions?

No comments:

Post a Comment