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:/
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 expressio
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
3 matches
Mail list logo