Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Jan 2007 06:02:29 +0500
From:      applecom@inbox.ru
To:        freebsd-questions@freebsd.org
Subject:   regexp [. .]
Message-ID:  <op.tl9w6ajvhbloih@xml.opera.com>

next in thread | raw e-mail | index | archive | help
I need to use regular expressions with a sequence of characters as a  
collating element.
 From re_format(7):
"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'."
But grep (and other programs using regexp) writes on "echo somepattern |  
grep -Ee 'some[^[.pattern.]]'":
"Invalid collation character". What's wrong?



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?op.tl9w6ajvhbloih>