X-Spam-Check-By: sourceware.org To: cygwin AT cygwin DOT com From: Eric Blake Subject: Re: Bash regular expressions Date: Wed, 20 Dec 2006 15:15:44 +0000 (UTC) Lines: 33 Message-ID: References: <45884F6E DOT 5070701 AT yandex DOT ru> <4588BC85 DOT 2090902 AT byu DOT net> <45894FF0 DOT 1020800 AT yandex DOT 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 AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Boris Toloknov 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/