X-Spam-Check-By: sourceware.org From: "Dave Korn" To: Subject: Bash regex tests wh'appen? Date: Thu, 11 Jan 2007 16:07:27 -0000 Message-ID: <013b01c7359a$96ecb740$a501a8c0@CAM.ARTIMI.COM> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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/