I am trying to replace all the hex codes in an HTML/XML format file with their ASCII equivalents. For example I want to replace %20 with a space, %3A with : and so on.
Obviously there are many possibilities. I can find them all with this RE:
%\([:xdigit:]\{2\}\)
But I can't work out how to code the replace RE. I thought it would be:
\x\1
... but this just replaces the % with \x.
Here's a sample of what I am trying to achieve:
Before:
Web%20Address%3A
After
Web Address:
Any ideas?
Thanks
Mike
Cleaning hex codes from HTML/XML eg %20, $2D
Moderators: AmigoJack, bbadmin, helios, MudGuard
-
mike
use javascript instead
it seems other tools can do this better. someone suggested perl. i am using javascript, which has an unencode function which does exactly what I described.
mike
mike