delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/10/20/15:26:02

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=0.0 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
In-Reply-To: <4ADD1298.6050305@byu.net>
References: <loom DOT 20091019T224729-941 AT post DOT gmane DOT org> <f60fe000910191734ibd7aae2td2041ab0ed8216f0 AT mail DOT gmail DOT com> <4ADD1298 DOT 6050305 AT byu DOT net>
Date: Tue, 20 Oct 2009 09:25:49 -1000
Message-ID: <cc8bda910910201225t97a01berc679a999ab60191f@mail.gmail.com>
Subject: Re: 1.5, 1.7: Bash regex not recognizing word boundaries
From: Allen Halsey <allenhalsey AT gmail DOT com>
To: cygwin AT cygwin DOT com
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On Mon, Oct 19, 2009 at 3:30 PM, Eric Blake <ebb9 AT byu DOT net> wrote:
>
> Indeed - \b is a GNU extension available in glibc's regcomp(), but not
> required by POSIX nor available in newlib. =A0Unless/until someone
> contributes patches to write the same extensions to the POSIX interface,
> then bash won't be able to make use of those extensions. =A0One other opt=
ion
> would be to ask the upstream bash project if the maintainer would be
> willing to pull in GNU regex.c on platforms where regcomp() is
> POSIX-compliant but lacks GNU extensions. =A0But it's unfortunately not on
> the top of my priority list.
>

I see, thank you.

After a more thorough search of the archives, I see the issue of
regcomp not recognizing '\b' as word boundaries came up before:

  http://www.cygwin.com/ml/cygwin/2006-03/msg00362.htm

I was relying on the man page for egrep as my guide to regex syntax.

I'll now stick to the POSIX compliant subset [1]. If I find the need
for more powerful regex, I'll write the script in perl or python.

[1]: http://www.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html

Allen

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019