[Mono-bugs] [Bug 79472][Wis] New - Regex GetGroupNumbers doesn't include 0 for the entire pattern

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Fri Sep 22 08:57:42 EDT 2006


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by sanxiyn at gmail.com.

http://bugzilla.ximian.com/show_bug.cgi?id=79472

--- shadow/79472	2006-09-22 08:57:42.000000000 -0400
+++ shadow/79472.tmp.26129	2006-09-22 08:57:42.000000000 -0400
@@ -0,0 +1,36 @@
+Bug#: 79472
+Product: Mono: Class Libraries
+Version: 1.1
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: System
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: sanxiyn at gmail.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Regex GetGroupNumbers doesn't include 0 for the entire pattern
+
+IronPython interactive session on Mono:
+
+>>> from System.Text.RegularExpressions import Regex
+>>> r = Regex('(a)|(b)')
+>>> r.GetGroupNumbers()
+System.Int32[](0, 1)
+
+On MS.NET:
+
+>>> from System.Text.RegularExpressions import Regex
+>>> r = Regex('(a)|(b)')
+>>> r.GetGroupNumbers()
+System.Int32[](0, 1, 2)
+
+This MSDN documentation clearly indicates that group number 0 refers to the
+entire pattern. So above should return 3 group numbers.
+
+http://msdn2.microsoft.com/en-us/library/bs2twtah.aspx


More information about the mono-bugs mailing list