regex - Batch converting straight quotes to smart quotes from MySQL database -


i have mysql table 250 blog entries, using straight quotes (" , ') instead of smart quotes (“ ” , ‘ ’). need take entries , somehow batch find-and-replace replace straight quotes smart quotes. problem these fields contain html, need ensure quotes within <> tags ignored.

i've exported appropriate fields , opened in sublime text thinking regex find-and-replace. it's there hit wall, though.

suggestions?

i don't know how enter smart quotes in sublime text 2, tested following regex (in sublime text 2 itself) single quote case using [] replacement characters:

find what:    ((?:[^<'>]*|<.*?>)*)'(.*?)' replace with: $1[$2] 

hopefully help.

here rubular it, showing matches.


Comments

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -