in reply to Regex to cange HTML %?? to char(0x??);
From Effective Perl Programming (Hall with Schwartz, 0-201-41975-0 not linked to Fatbrain, please support your local meatspace bookstore),
which also says only one paragraph later$_ = "a%5eb"; s/%([0-9a-fA-F]{2})/pack("c",hex($1))/ge;
Both will result in $_ eq "a^b".use URI::Escape; $_ = uri_unescape "a%5eb";
and Yes, it will handle "9%25EA" correctly, tranforming it to "9%EA" and not eating the output %. See s///g. (What's 9%EA? maybe fair share for 11-way split, less crumbs.)
-- Bill / n1vux
|
|---|