Most advanced text editors (jEdit for example) have a "Find & Replace in Files" feature that supports regular expressions. In other words: design a regexp to do what you want, pluck it in and off you go.

Doesn't work for files that don't contain plain text, such as Word documents.