flex icon indicating copy to clipboard operation
flex copied to clipboard

Documentation bug for Flex patterns

Open ricilake opened this issue 2 years ago • 1 comments

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

ricilake avatar Apr 23 '22 02:04 ricilake

I thought we'd handled this already. PR is in flight.

Mightyjo avatar May 11 '22 21:05 Mightyjo