You all probably know this already, but you can turn this
into this with the replace command using an extended search type
Nice... this eases a frustration of mine and I should have thought to use Notepad++.Diolch.
Notepad++ has a handy plugin called "Poor Man's SQL Formatter" that I use for this work. Very configurable, and I mapped it to a keyboard shortcut.