[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: |
Greg Wooledge |
Subject: |
Re: Matching regular expression with Ctrl-A in the middle |
Date: |
Thu, 5 May 2011 08:26:11 -0400 |
User-agent: |
Mutt/1.4.2.3i |
On Wed, May 04, 2011 at 10:23:20AM -0500, Shawn Bohrer wrote:
> -bash-4.1$ [[ "helloworld" =~ oworld$ ]] && echo match
> -bash-4.1$
Confirmed here (HP-UX 10.20), even using the approved "stuff the RE into
a variable" workaround that fixes most =~ problems:
imadev:~$ bash-4.1.7
imadev:~$ re=$'o\001world$' string=$'hello\001world'; [[ $string =~ $re ]] &&
echo match
imadev:~$
It works fine with Ctrl-B for whatever reason:
imadev:~$ re=$'o\002world$' string=$'hello\002world'; [[ $string =~ $re ]] &&
echo match
match
imadev:~$
I get the same results with bash 4.1.9 and with bash 4.2.7.