This doesn't need to be a built-in feature of Textpad. Just make your own scrupt (in Textpad, if you want) and launch it with a user-defined tool in textpad. Easy.
I wasn't suggesting it be built in to TextPad - perhaps I put this in the wrong bit of the forum.
Can you point me to any resources for writing scripts to do this sort of thing in TextPad? I know the basis will be several search/replace and regex functions, but not sure how to build it all into one reliable script.