On 3/15/07, Jens Stroebel <[EMAIL PROTECTED]> wrote: > On Thu, Mar 15, 2007 at 01:11:31PM +0100, Jens Stroebel wrote: > > > Reading your posts, I got and applied the above-mentioned patch; > > contrary to what I expected, [[ $test =~ $regexpr ]] worked, whereas > > [[ "$test" =~ "$regexpr" ]] did not. See below: > > > > ============================================================================= > > [EMAIL PROTECTED]:/usr/src/rpm> if [[ "sploerp" =~ "s.*rp" ]] ; then echo > > yes ; fi > > [EMAIL PROTECTED]:/usr/src/rpm> if [[ sploerp =~ s.*rp ]] ; then echo yes ; > > fi > > yes > > ============================================================================= > > Following up my own post, sorry, but I thought the above incomplete after > a bit more testing: > > It seems like it's OK to "" the left side of the comparison, > but not the regex which should be matched:
Jens, if you think this is a bug, it would be great if you could ask on bug-bash. The worst that can happen is that they tell you it's not a bug. Actually, it looks like this has happened already, and you have to be careful with bash-3.1 v. 3.2 when using quotes on the rhs. http://lists.gnu.org/archive/html/bug-bash/2007-03/msg00017.html -- Dan -- http://linuxfromscratch.org/mailman/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page