This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Bash regex tests wh'appen?



  I upgraded quite a lot of bash versions in one go, and one of my
shell-scripts broke.  I've reproduced it to a simple test case which shows
that either regex tests have turned into non-reg-ex text matches, or that I've
really misunderstood something here.  I checked the last few release
announcements and didn't see anything about the behaviour of =~ changing.



/artimi/tools/cygwin/bin $ if [[ "foo.h" =~ "foo.h" ]] ; then echo "yes" ;
else  echo "no" ; fi
yes
/artimi/tools/cygwin/bin $ if [[ "foo.h" =~ ".*foo.h" ]] ; then echo "yes" ;
else echo "no" ; fi
no
/artimi/tools/cygwin/bin $ if [[ "foo.h" =~ "\.\*foo.h" ]] ; then echo "yes" ;
else echo "no" ; fi
no
/artimi/tools/cygwin/bin $ cygcheck -c bash
Cygwin Package Information
Package              Version        Status
bash                 3.2.9-10       OK


  Reverting to 3.1-6 restores the expected behaviour (results above become
yes, yes, no).


    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....


--
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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]