Using textpad only, what regexp will find & amps; or &'s inside an href and replace them temporarily (even though I know the correct url encoding would have them be left as entities).. with a key that can be used later after TIDYING up. What I have now finds the first instance, but url params with multiple &'s don't get cleaned right, and doesn't account for items that are properly encoded with & amp; s already.
Here's what I have:
FIND WHAT: \(<a href="[^"]+?\)&
REPLACE WITH: \1-AMP-
What I want is something that will take this:
<A HREF="http://domain/boo.php?dross1=foo&dross2=bar&dross3=baz&dross4=alpha&dross5=beta&dross6=delta">
and turn it into this:
<A HREF="http://domain/boo.php?dross1=foo-AMP-dross2=bar-AMPENT-dross3=baz-AMP-dross4=alpha-AMP-dross5=beta-AMPENT-dross6=delta">
That way I can quickly search and replace to revert them back to their initial sate afterwards since this is only for validating, not for saving.
Thanks!