Hi!

For those not fluent with regular expressions:

On Don, 2007-10-04 at 23:06 +0000, Bernd Petrovitsch wrote:
[...]
> Modified Files:
> 	oscan.lex 
> Log Message:
> * apparently no one is using hex values in olsrd.conf as the HEXDIGIT
>   reg-exp was totally broken.
>   fixed  it. And renamed it to HEX8
[...]
> diff -C2 -d -r1.25 -r1.26
> *** oscan.lex	13 Sep 2007 16:08:13 -0000	1.25
> --- oscan.lex	4 Oct 2007 23:06:10 -0000	1.26
[...]
> ***************
> *** 131,152 ****
[...]
> ! HEXDIGIT [a-f][A-F][0-9]

That matches all strings that
- start with an a,b,c,d,e, or f.
- followed by a A,B,C,,E, or F.
- followed by a single (decimal) digit.
[...]  
> ! HEXBYTE ([a-f]|[A-F]|[0-9]){1,4}

That matches (ignoring the "{1,4}" at the end) all strings that
- an a,b,c,d,e, or f OR
- an A,B,C,D,E, or F OR
- a single (decimal) digit.
and is more of a working pattern but overly complicated.

The (only) optimal and simple to read representation for a hex-digit
is "[a-fA-F0-9]".

	Bernd
-- 
Firmix Software GmbH                   http://www.firmix.at/
mobil: +43 664 4416156                 fax: +43 1 7890849-55
          Embedded Linux Development and Services




