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

RayL:
I can't see how any of the regex expressions I have used thus far requires a space between the ';' and the hex number.

In reply #14 you have

char pat1[] = "([Aa][Tt][Ss])%s+(ULTRALIGHT) ;(0[xX])?([0-9a-fA-F][0-9a-fA-F])+";
//char pat1[] = "([Aa][Tt][Ss])%s+(ULTRALIGHT) ;0?[xX]?([a-fA-F0-9][a-fA-F0-9]+)";

There is a space after the ';' in the first expression. If you don't believe me just paste it into a decent text editor using a fixed width font i.e. not Notepad.

Using regex as a general tokeniser is normally a bad idea since it tends to be difficult to maintain because the syntax tends to obfuscate the meaning. If I do need a general parser I try to use 'lex' and ''yacc'. I'm a great fan of regex and use them frequently for just the sort of task you are using them on. They do require one to take great care when writing them and even more care when testing them.