in reply to Re: Looking for regexp to convert hex numbers in text
in thread Looking for regexp to convert hex numbers in text

Two things:

  1. This doesn't work, you have to use chr(hex($2))otherwise the numbers are converted as integer values and not hex!
  2. You don't need two pairs of capturing parens, this is unnecessary extra work for the regex engine.
So the correct solution is s/\[0x([a-f0-9A-F]{1,2})\]/chr(hex($1))/eg;

-- Hofmator