Thread: Regex examples
View Single Post
Old 06-19-2012, 10:47 AM   #78
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
You could create a simple sed script with one line for each character that you need to fix. E.g.

Code:
s/A@/à/g
s/B@/ç/g
Then simply save the lines as a utf8 text file (without BOM), e.g. fix.sed, and execute it with sed:

Code:
sed -f fix.sed -i *.html
(Note that this will overwrite the original files.)
Doitsu is offline   Reply With Quote