How to convent regex with pack and hex from Perl to Python
- by Brent McConnell
I am a newcomer to Python and am converting a Perl script. What is the Python equivalent to...
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
Any help is greatly appreciated.