flex
flex copied to clipboard
Documentation bug for Flex patterns
Two errors in the Flex pattern documentation which have gone uncorrected for a long time:
Note that inside of a character class, all regular expression operators lose their special meaning except escape (‘\’) and the character class operators, ‘-’, ‘]]’, and, at the beginning of the class, ‘^’.
and a little further down:
For example, the following character classes are all equivalent:
[[:alnum:]]
[[:alpha:][:digit:]]
[[:alpha:][0-9]]
[a-zA-Z0-9]
The third example is not equivalent.
Line 890 of flex/flex.texi
operators, @samp{-}, @samp{]]}, and, at the beginning of the class, @samp{^}.
Should read:
operators, @samp{-}, @samp{]}, and, at the beginning of the class, @samp{^}.
Line 969 of flex.texi
[[:alpha:][0-9]]
Should be
[[:alpha:]0-9]
https://github.com/westes/flex/blob/master/doc/flex.texi#L969
I thought we'd handled this already. PR is in flight.