How about these?
# The above shrunk a bit. $str =~ s/%([0-9A-F][0-9A-F])/chr(hex($1))/ieg; # - or more cryptic $str =~ s/%([0-9A-F][0-9A-F])/sprintf("%1c",hex($1))/ieg;
Can anyone think of something that doesn't use hex?
TGI says moo
Update
Bill's post and Abigail's clever method taken together let us chop off another character or so:
s/%([0-9A-F]{2})/"chr 0x$1"/igee;TGI - Syncretic Cretin
In reply to Re: Re: Regex to cange HTML %?? to char(0x??);
by TGI
in thread Regex to cange HTML %?? to char(0x??);
by Buckaroo Buddha
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |