[Mono-bugs] [Bug 56761][Nor] New - Regex doesnt like A{,2} for repitition bounds

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Fri, 9 Apr 2004 14:44:44 -0400 (EDT)

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 dave-gnome-bugs@earth.li.


--- shadow/56761	2004-04-09 14:44:44.000000000 -0400
+++ shadow/56761.tmp.21043	2004-04-09 14:44:44.000000000 -0400
@@ -0,0 +1,57 @@
+Bug#: 56761
+Product: Mono: Class Libraries
+Version: unspecified
+OS Details: 
+Status: NEW   
+Priority: Normal
+Component: System
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: dave-gnome-bugs@earth.li               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+Summary: Regex doesnt like A{,2} for repitition bounds
+Description of Problem:
+If you try to create a regular expression using {,n} as the specified
+bounds you get an exception, rather than it equating to {0,n}.
+Steps to reproduce the problem:
+using System;
+using System.Text.RegularExpressions;
+class t1
+  static void Main(string [] args ) {
+    new Regex("a{,1}");
+  }
+Actual Results:
+Unhandled Exception: System.ArgumentException: parsing "a{,1}" - Illegal
+{x,y} - bad value of x.
+Parameter name: a{,1}
+in <0x00096>
+in <0x0070f> System.Text.RegularExpressions.Syntax.Parser:ParseGroup
+in <0x00087>
+in <0x00094> System.Text.RegularExpressions.Regex:.ctor
+in <0x00012> System.Text.RegularExpressions.Regex:.ctor (string)
+in <0x00022> t1:Main (string[])
+Expected Results:
+None of those nasty exception things.