X-Spam-Check-By: sourceware.org
To: cygwin@cygwin.com
From: Eric Blake <ebb9@byu.net>
Subject:  Re: Bash regular expressions
Date: Wed, 20 Dec 2006 15:15:44 +0000 (UTC)
Lines: 33
Message-ID:  <loom.20061220T161029-447@post.gmane.org>
References:  <45884F6E.5070701@yandex.ru> <4588BC85.2090902@byu.net> <45894FF0.1020800@yandex.ru>
Mime-Version:  1.0
Content-Type:  text/plain; charset=us-ascii
Content-Transfer-Encoding:  7bit
User-Agent: Loom/3.14 (http://gmane.org/)
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.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

Boris Toloknov <tlknv <at> yandex.ru> writes:

> 
> I tried:
> [[ abc =~ a.*c ]] && echo It works
> It doesn't work too.

$ [[ abc =~ a.*c ]] && echo yes
yes
$ echo ${BASH_REMATCH[@]}
abc
$ echo $BASH_VERSION
3.2.9(10)-release

Are you sure you are using the latest version of bash?  (Hint - following these 
directions, and including 'cygcheck -svr' output as an attachment would help 
here).
> Problem reports:       http://cygwin.com/problems.html


> I did't try bash from gnu.org yet but debian bash (version 3.1.0(1)) works 
with and without quotes.

What part of "In bash 3.2, the [[ ]] quoting rules changed slightly" don't you 
understand?  bash 3.1.0 has different quoting rules than 3.2, whether debian or 
cygwin packaged it.  As I have not touched any of the upstream bash code in 
this area, you should not get any different behavior on this test case by 
building bash from the upstream sources, and I still haven't seen anything 
implicating a cygwin-specific bug.

-- 
Eric Blake



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

