in reply to Help with parsing a string

Yet another way to represent a hexadecimal digit is to use the POSIX character class (see perlre):
[[:xdigit:]]