Thread: Regex examples
View Single Post
Old 06-19-2012, 10:47 AM   #78
Doitsu
Wizard
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: 1,822
Karma: 4525859
Join Date: Dec 2010
Device: Kindle 3, 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