Okay, I guess I'll make the required mention
of using taint. And why do I bring taint up
here? Well all of these implementations
are susceptible to
poison null.
Even if you're doing some data-validation
without taint chances are you'd miss that.
Also note that + is sometimes used to encode
spaces as well.
--
perl -pe "s/\b;([st])/'\1/mg"