[IronPython] Bug in re module

Keith J. Farmer kfarmer at thuban.org
Fri Jul 22 08:37:12 CEST 2005


Looks like it's using the .NET RegEx library.  Here's the reference, in
case there are syntax differences in the RegEx language used:

http://msdn.microsoft.com/library/en-us/cpgenref/html/cpconRegularExpres
sionsLanguageElements.asp
Grouping Constructs:
http://msdn.microsoft.com/library/en-us/cpgenref/html/cpconGroupingConst
ructs.asp

-----Original Message-----
From: users-ironpython.com-bounces at lists.ironpython.com
[mailto:users-ironpython.com-bounces at lists.ironpython.com] On Behalf Of
Mike Hostetler

>>> sect = re.compile('\[(?P<header>[^]]+)\]')
System.ArgumentException: parsing "\[(?P<header>[^]]+)\]" - Unrecognized
grouping construct.
   at System.Text.RegularExpressions.RegexParser.ScanGroupOpen()
   at System.Text.RegularExpressions.RegexParser.ScanRegex()
   at System.Text.RegularExpressions.RegexParser.Parse(String re,
RegexOptions op)
   at System.Text.RegularExpressions.Regex..ctor(String pattern,
RegexOptions options, Boolean useCache)
   at System.Text.RegularExpressions.Regex..ctor(String pattern)
   at input_1.Run(Frame frame)

It seems to not like the group name.




More information about the Ironpython-users mailing list