Hello,
Searched high and low for this one without any joy, so came here for some advice.
I have a string where I would like to replace all the hex values to 'normal' chars.
This is my string: my $title = "C%3A%5CMy%20Documents%5CMy%20Pictures%5Cbodmin1.jpg"
I would like it to read: C:\My Documents\My Pictures\bodmin1.jpg
I tried this, but it didn't work: my $testtitle =~ s/%([0-9a-fA-F][0-9a-fA-F])/pack("c",hex($title))/ge;
Any suggestions or ideas?
In reply to More regex's with hex's by spiderbo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |