[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: regex subexpressions broken

From: Chet Ramey
Subject: Re: regex subexpressions broken
Date: Sat, 12 May 2007 21:20:51 -0400
User-agent: Thunderbird (Macintosh/20070326)

address@hidden wrote:
> Configuration Information [Automatically generated, do not change]:
> Machine: i686
> OS: linux-gnu
> Compiler: i686-pc-linux-gnu-gcc
> Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i686' 
> -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-pc-linux-gnu' 
> -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL 
> -DHAVE_CONFIG_H   -I.  -I. -I./include -I./lib   -march=athlon-tbird -O3 
> -fomit-frame-pointer -pipe
> uname output: Linux gollum 2.6.18-gentoo-r4 #1 PREEMPT Sat Dec 9 14:19:35 CET 
> 2006 i686 AMD Athlon(tm) processor AuthenticAMD GNU/Linux
> Machine Type: i686-pc-linux-gnu
> Bash Version: 3.2
> Patch Level: 15
> Release Status: release
> Description:
> [[ "a b c" =~ "a (.) c" ]]
> echo ${BASH_REMATCH[1]}
> Does not return a result any more. It used to work.

Beginning with bash-3.2, quoting the rhs of the =~ operator causes the
quoted portions to be matched as strings, as the == operator works.

This is in the latest version of the Bash FAQ, which, for some reason,
I have been blocked from posting to bug-bash.  I will try again.


``The lyf so short, the craft so long to lerne.'' - Chaucer
                       Live Strong.  No day but today.
Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]