This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Bash regular expressions
Boris Toloknov <tlknv <at> yandex.ru> writes:
>
> I tried:
> [[ abc =~ a.*c ]] && echo It works
> It doesn't work too.
$ [[ abc =~ a.*c ]] && echo yes
yes
$ echo ${BASH_REMATCH[@]}
abc
$ echo $BASH_VERSION
3.2.9(10)-release
Are you sure you are using the latest version of bash? (Hint - following these
directions, and including 'cygcheck -svr' output as an attachment would help
here).
> Problem reports: http://cygwin.com/problems.html
> I did't try bash from gnu.org yet but debian bash (version 3.1.0(1)) works
with and without quotes.
What part of "In bash 3.2, the [[ ]] quoting rules changed slightly" don't you
understand? bash 3.1.0 has different quoting rules than 3.2, whether debian or
cygwin packaged it. As I have not touched any of the upstream bash code in
this area, you should not get any different behavior on this test case by
building bash from the upstream sources, and I still haven't seen anything
implicating a cygwin-specific bug.
--
Eric Blake
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/