You are right. Without quotes it works:
[[ abc =~ a.*c ]] && echo Yes
Yes
I was sure I tried that. Sorry.
Thanks a lot,
Boris
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.htm
Boris Toloknov yandex.ru> writes:
>
> I tried:
> [[ abc =~ a.*c ]] && echo It works
> It doesn't work too.
$ [[ abc =~ a.*c ]] && echo yes
yes
$ echo [EMAIL PROTECTED]
abc
$ echo $BASH_VERSION
3.2.9(10)-release
Are you sure you are using the latest version of bash? (Hint - following these
di
I tried:
[[ abc =~ a.*c ]] && echo It works
It doesn't work too.
I did't try bash from gnu.org yet but debian bash (version 3.1.0(1)) works with
and without quotes.
Boris
Eric Blake wrote:
According to Boris Toloknov on 12/19/2006 1:45 PM:
It seems that regular expressions [[ str =~ regex
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
According to Boris Toloknov on 12/19/2006 1:45 PM:
> It seems that regular expressions [[ str =~ regex ]] do not work in bash.
> For example the following expression doesn't match:
> [[ abc =~ 'a.*c' ]] && echo It works
In bash 3.2, the [[ ]] quoting
Boris Toloknov wrote:
It seems that regular expressions [[ str =~ regex ]] do not work in bash.
For example the following expression doesn't match:
[[ abc =~ 'a.*c' ]] && echo It works
while the simple substring matches:
[[ abc =~ 'bc' ]] && echo It works
Is it a bug ?
WJFFM. Maybe you should s
It seems that regular expressions [[ str =~ regex ]] do not work in bash.
For example the following expression doesn't match:
[[ abc =~ 'a.*c' ]] && echo It works
while the simple substring matches:
[[ abc =~ 'bc' ]] && echo It works
Is it a bug ?
Thanks,
Boris
--
Unsubscribe info: http:/
6 matches
Mail list logo