a question about RE

Vern Paxson vern at icir.org
Sat Jan 17 07:43:12 PST 2004


> ESCSEQ (\\([^\n]|[0-7]+|x[[:xdigit:]]+))
> 
> I can't understand what "[[:xdigit:]]" means? 
> Would you give me an explanation?

[[:xdigit:]] is one of the magic charaacter classes that POSIX standardized.
It expands to any hex digit, i.e., [0-9a-fA-F].  More precisely, it expands
to any character matched by <ctype.h>'s isxdigit().  The full set of such
expansions are:

	[:alnum:] [:alpha:] [:blank:] [:cntrl:] [:digit:] [:graph:]
	[:lower:] [:print:] [:punct:] [:space:] [:upper:] [:xdigit:]

- Vern



More information about the Bro mailing list