Re: Bash regular expressions

2006-12-20 Thread Boris Toloknov
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

Re: Bash regular expressions

2006-12-20 Thread Eric Blake
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

Re: Bash regular expressions

2006-12-20 Thread Boris Toloknov
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

Re: Bash regular expressions

2006-12-19 Thread Eric Blake
-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

Re: Bash regular expressions

2006-12-19 Thread Matthew Woehlke
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

Bash regular expressions

2006-12-19 Thread Boris Toloknov
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:/