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 2.6.35.6-45.fc14.x86_64 #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. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, ITS, CWRU c...@case.edu http://cnswww.cns.cwru.edu/~chet/
*** ../bash-4.2-patched/pathexp.c 2010-08-13 23:21:57.000000000 -0400 --- pathexp.c 2011-05-05 16:40:58.000000000 -0400 *************** *** 197,201 **** if ((qflags & QGLOB_FILENAME) && pathname[i+1] == '/') continue; ! if ((qflags & QGLOB_REGEXP) && ere_char (pathname[i+1]) == 0) continue; temp[j++] = '\\'; --- 197,201 ---- if ((qflags & QGLOB_FILENAME) && pathname[i+1] == '/') continue; ! if (pathname[i+1] != CTLESC && (qflags & QGLOB_REGEXP) && ere_char (pathname[i+1]) == 0) continue; temp[j++] = '\\';