delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/11/24/14:51:32

X-Recipient: archive-cygwin AT delorie DOT 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: <26500158.post@talk.nabble.com>
Date: Tue, 24 Nov 2009 11:51:21 -0800 (PST)
From: aputerguy <nabble AT kosowsky DOT org>
To: cygwin AT cygwin DOT com
Subject: Cygwin bash regexp matching doesn't treat "\b" properly
MIME-Version: 1.0
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.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

The following behavior differs between Cygwin bash (both versions 3.2.39,
3.2.49) and Fedora/Linux bash (both versions 3.2.33 and 4.0.33):

$ [[ "foo" =~ \\bfoo\\b ]]; echo $?

Cygwin:
1

Linux:
0

Cygwin returns 0 only if I remove the \\b from before and after the word
'foo'

What is going on here?
-- 
View this message in context: http://old.nabble.com/Cygwin-bash-regexp-matching-doesn%27t-treat-%22%5Cb%22-properly-tp26500158p26500158.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

- Raw text -


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