Eric Blake wrote:
> If you want a quicker table, I can attempt to provide one (note that
> POSIX BRE do not actually have to support \+ \? or \|; but glibc and
> gnulib's implementation does):
>
> feature 0-or-more 1-or-more 1-or-0 grouping/alternation intervals
> charclasses
> syntax
> 0 (old emacs) * + ? \( \| \) n/a n/a
> emacs * + ? \( \| \) \{ \}
> [[:...:]]
> posix-basic * \+ \? \( \| \) \{ \}
> [[:...:]]
> posix-extended * + ? ( | ) { }
> [[:...:]]
This is a very nice table. How about adding it to the Gnulib documentation?
I tried to reduce the width by transposing the table, but it is not
as pretty as in the way you wrote it:
syntax 0 (old emacs) emacs posix-basic posix-extended
feature
0-or-more * * * *
1-or-more + + \+ +
1-or-0 ? ? \? ?
grouping/alternation \( \| \) \( \| \) \( \| \) ( | )
intervals n/a \{ \} \{ \} { }
charclasses n/a [[:...:]] [[:...:]] [[:...:]]
Bruno