grepWin is a simple, yet powerful, freeware tool for difficult search and replace operations on text files (for example, xml or html files).
For complex search and replace operations, nothing really beats RegEx (regular expressions) searches, but regular expressions may be very difficult to create.
grepWin includes a "Test regex" utility: by using the utility on a sample of the text, you can