The thing is if you have trouble figuring out how to separate the two, how is a program or regex search supposed to figure it out. The perfect one that will get everything you want always seems to sweep up others too.
My solution is to gear for these ones that sweep everything and search one at a time, ready to hit replace and find, but also ready to go up to the text to fix something that would be overfixed by the regex. It is not so fast, but it is much faster than reading and fixing line by line or faster than repairing the damage of an overactive replace.
|