Actually, looking at my code (I actually wrote the heart of this over a year ago), I've got custom processes for every replacement. I probably just don't know how to use regex's properly, but I wanted to be able to either preserve case, or sometimes lower case, etc.
For example if I wanted to replace all instances of 'hello' with 'howdy', I want Hello to become Howdy, HELLo to become HOWDy, and HELLO to become HOWDY. However with some replacements I wanted to change only subsequent case, so that Hello became Howdy, and HELLO became Howdy. I couldn't see a way to do that in regular expressions without a processing function.
Bottom line, is that now that I look at my code, I can't easily change it into a list of regular expressions.
|