From re_format(7)
The same goes for an equivalence class:
All the same result! Is this a bug?
Within a bracket expression, a collating element (a character, a multi-
character sequence that collates as if it were a single character, or a
collating-sequence name for either) enclosed in `[.' and `.]' stands for
the sequence of characters of that collating element. The sequence is a
single element of the bracket expression's list. A bracket expression
containing a multi-character collating element can thus match more than
one character, e.g. if the collating sequence includes a `ch' collating
element, then the RE `[[.ch.]]*c' matches the first five characters of
`chchcc'.
Code:
# echo 'lhhhocate chchccccclulzc dlen' | egrep --color '[[.chte.]]*'
egrep: Invalid collation character
# echo 'lhhhocate chchccccclulzc dlen' | egrep --color '[.chte.]+'
# echo 'lhhhocate chchccccclulzc dlen' | egrep --color '[chte]+'
Will give SAME output and matching (colored)
The same goes for an equivalence class:
Code:
# echo 'lhhhocate chchccccclulzc dlen' | egrep --color '[[=chte=]]+'
egrep: Invalid collation character
# echo 'lhhhocate chchccccclulzc dlen' | egrep --color '[=chte=]+'
All the same result! Is this a bug?