From owner-freebsd-questions@FreeBSD.ORG Wed Jan 17 01:02:33 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4D36D16A525 for ; Wed, 17 Jan 2007 01:02:33 +0000 (UTC) (envelope-from applecom@inbox.ru) Received: from mx1.mail.ru (mx1-2.mail.ru [194.67.23.121]) by mx1.freebsd.org (Postfix) with ESMTP id 0F1D513C46A for ; Wed, 17 Jan 2007 01:02:32 +0000 (UTC) (envelope-from applecom@inbox.ru) Received: from [85.115.165.63] (port=44851 helo=xml.opera.com) by mx1.mail.ru with asmtp id 1H6zCB-000LwU-00 for freebsd-questions@freebsd.org; Wed, 17 Jan 2007 04:02:31 +0300 Date: Wed, 17 Jan 2007 06:02:29 +0500 To: freebsd-questions@freebsd.org From: applecom@inbox.ru Content-Type: text/plain; format=flowed; delsp=yes; charset=iso-8859-1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Message-ID: User-Agent: Opera Mail/9.10 (FreeBSD) Subject: regexp [. .] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Jan 2007 01:02:33 -0000 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?