Thanks for the bug report, Eric, I've filed another bug on CodePlex to track this more complicated issue.
http://www.codeplex.com/IronPython/WorkItem/View.aspx?WorkItemId=11136 Martin From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Thursday, June 14, 2007 9:10 AM To: [email protected] Subject: [IronPython] Valid regex under CPython won't compile under IronPython #test.py import re # The below line fails under IronPython 1.1 (but works under Cpython) regex = re.compile( r"^(?P<msg>NMAKE[A-Za-z0-9]*)'\"?(?P<file>[\\A-Za-z0-9/:_\.\+]+)" ) if regex.search( r"NMAKE0119'adirectory\afile.txt" ): print 'good' else: print 'bad' ---------------------------------------------------------------------- The following error is emitted: re.error: parsing "^(?<msg>NMAKE[A-Za-z0-9 \t:]*)'\"?(?<file>[\A-Za-z0-9/:_\.\+]+)" - Unrecognized escape sequence \A. There was a previous bug report about this at http://lists.ironpython.com/pipermail/users-ironpython.com/2006-September/003382.html which was fixed, but it doesn't seem to work in this more complicated case. If the double slashes are moved to the end of the character class, it works. Interestingly, it also works if you remove the \"?. Thanks, Eric
_______________________________________________ users mailing list [email protected] http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
