Most editors support regexp find and replace. Emacs supports building the regular expression first with re-builder. http://t.co/Ick6z2gg7V