[Top][All Lists]

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

Re: Matching regular expression with Ctrl-A in the middle

From: Chet Ramey
Subject: Re: Matching regular expression with Ctrl-A in the middle
Date: Thu, 05 May 2011 16:47:15 -0400
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv: Gecko/20110414 Thunderbird/3.1.10

On 5/4/11 11:23 AM, Shawn Bohrer wrote:
> Configuration Information [Automatically generated, do not change]:
> Machine: x86_64
> OS: linux-gnu
> Compiler: gcc
> Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' 
> -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-redhat-linux-gnu' 
> -DCONF_VENDOR='redhat' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' 
> -DSHELL -DHAVE_CONFIG_H   -I.  -I. -I./include -I./lib  -D_GNU_SOURCE 
> -DRECYCLES_PIDS  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions 
> -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic
> uname output: Linux dev1 #1 SMP Mon Oct 18 23:57:44 
> UTC 2010 x86_64 x86_64 x86_64 GNU/Linux
> Machine Type: x86_64-redhat-linux-gnu
> Bash Version: 4.1
> Patch Level: 7
> Release Status: release
> Description:
> I have a regular expression with a Ctrl-A character in the middle and I
> can no longer get it to match with bash 4.1.7.  However I can get
> regular expressions to match as long as the Ctrl-A is at the beginning
> or end of the regular expression so I suspect this is a bug.

Try the attached patch.  It's against bash-4.2, but the bash-4.1 code is
substantially similar.

``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/

Attachment: regexp-ctl-a.patch
Description: Source code patch

reply via email to

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