X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 	tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS
X-Spam-Check-By: sourceware.org
Message-ID: <26500814.post@talk.nabble.com>
Date: Tue, 24 Nov 2009 12:11:05 -0800 (PST)
From: aputerguy <nabble@kosowsky.org>
To: cygwin@cygwin.com
Subject: Re: Cygwin bash regexp matching doesn't treat "\b" properly
In-Reply-To: <26500158.post@talk.nabble.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
References: <26500158.post@talk.nabble.com>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com


OK - I think I found the answer which is that \b is a GNU extension not
recognized in cygwin.

So, I guess the question now is there an alternative way of recognizing word
boundaries?

In particular, I am trying to match a process id where $proc is a list of
one or more processes (awk'd from ps). 
So, for example, I want to make sure that if $proc="123 456 789" that "456"
matches but not "45"

Perhaps, I could try adding white space as in 
[[ " $proc " =~ " 456 " ]]
but not sure if that will always work.

So, what is the best way to do this without the "\\b" word boundary symbol?
-- 
View this message in context: http://old.nabble.com/Cygwin-bash-regexp-matching-doesn%27t-treat-%22%5Cb%22-properly-tp26500158p26500814.html
Sent from the Cygwin list mailing list archive at Nabble.com.


--
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

