pattern for even number of HEX digits using Nick Gammon's Regexp library

That might have worked for your simple test case but it is wrong since it allows the hex values to be prefixed by 'x' or 'X' or '0' or "0x" or "0X".

Please post the complete sketch that failed when using (0[xX])?([0-9a-fA-F][0-9a-fA-F])+" ; it has something else wrong.