diff options
author | Will Estes <westes@users.noreply.github.com> | 2022-05-16 15:55:38 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-16 15:55:38 -0400 |
commit | 00bfa85257ea06d55d9da7dcccda0a6083d9f067 (patch) | |
tree | 8184e1d934472967a3fffd78747d08fc2ae03703 | |
parent | 4c0345cc2823058ffd57428e5d3d462758a242f7 (diff) | |
parent | 2bacaef4cf8ab274edfa87fbb11dfb5bba5d17f0 (diff) | |
download | flex-git-00bfa85257ea06d55d9da7dcccda0a6083d9f067.tar.gz |
Merge pull request #524 from Mightyjo/issue-521
doc(manual): Character classes
-rwxr-xr-x | doc/flex.texi | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/doc/flex.texi b/doc/flex.texi index 0302e5d..a2e0dce 100755 --- a/doc/flex.texi +++ b/doc/flex.texi @@ -887,7 +887,11 @@ an end-of-file when in start condition @code{s1} or @code{s2} Note that inside of a character class, all regular expression operators lose their special meaning except escape (@samp{\}) and the character class -operators, @samp{-}, @samp{]]}, and, at the beginning of the class, @samp{^}. +operators, @samp{-}, @samp{]}, and, at the beginning of the class, @samp{^}. +Additionally, @samp{-} and @samp{]} lose their special meaning if they +immediately follow the @samp{[} or @samp{[^} that start the class. Finally, +@samp{-} loses its special meaning if it immediately precedes the @samp{]} +that ends the class. @cindex patterns, precedence of operators The regular expressions listed above are grouped according to @@ -966,7 +970,7 @@ For example, the following character classes are all equivalent: @verbatim [[:alnum:]] [[:alpha:][:digit:]] - [[:alpha:][0-9]] + [[:alpha:]0-9] [a-zA-Z0-9] @end verbatim @end example |