Quote:
Originally Posted by roger64
Successive Find and Replace
I wish to clean an html text which suffers from recurrent mistakes from an OCR engine (Cuneiform).
When I meet one the mistakes, I make a replacement and I note it. After some pages, I met most of the mistakes and now I intend to build a regex, adding as many as 15 successive simple search and replace like the following two.
A@ → à
B@ → ç
I do not know how to perform these 15 F&R within a simple regex.Suppose I would like to build it for the two above, what should I write?
Nota: I already use utf8 for the whole text.
|
I'm not sure what you're asking for is feasible. What you've described is something that would be more suited to an external program/algorithm (or a plugin) rather than one single Regular Expression.
Finding all 15 with one expression wouldn't be the hard part...
replacement based on "if/then" logic is where it would fall apart.