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

stowite;

I can't see it. Here is the code you say has the space after the semi-colon in HEX (I use Edit+ v4.3).

0D 0A 63 68 61 72 20 70 61 74 31 5B 5D 20 3D 20
22 28 5B 41 61 5D 5B 54 74 5D 5B 53 73 5D 29 25
73 2B 28 55 4C 54 52 41 4C 49 47 48 54 29 20 3B
28 30 5B 78 58 5D 29 3F 28 5B 30 2D 39 61 2D 66
41 2D 46 5D 5B 30 2D 39 61 2D 66 41 2D 46 5D 29
2B 22 3B 0D 0A 2F 2F 63 68 61 72 20 70 61 74 31
5B 5D 20 3D 20 22 28 5B 41 61 5D 5B 54 74 5D 5B
53 73 5D 29 25 73 2B 28 55 4C 54 52 41 4C 49 47
48 54 29 20 3B 30 3F 5B 78 58 5D 3F 28 5B 61 2D
66 41 2D 46 30 2D 39 5D 5B 61 2D 66 41 2D 46 30
2D 39 5D 2B 29 22 3B

The semi-colon is 3B -- it is never followed by a space (20) although it is preceded by a space in both cases.
In the first line (NOT commented out) it's followed by a left-paren; in the second line (commented out) it's followed by a zero.

It sounds like you think I might be taking the right approach to use regex to parse the commands.

I have minimal experience with either lex or yacc.
Trying to use them at this point would just add additional burden.

I'll keep playing with regex and see if I can come up with something workable.

FYI: My intent was to use the semi-colon to mark the start of a string of characters which are data to be written to my output device.
At this point, I think I'm going to re-think how I want to allow the data to be expressed.
e.g. if I use CSV, then the sequence ...,125,... would be 125 decimal whereas, in Hex it would be either 7d or 7D or 0x7d or 0x7D or 0X7d or 0X7D.

On the other hand, if the "125" is supposed to be the 3 decimal digits '1' '2' '5', then it would be 1,2,5

Ray