[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.

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

--- 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: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: System
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: dave-gnome-bugs@earth.li               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+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:
+1. 
+
+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>
+System.Text.RegularExpressions.Syntax.Parser:ParseRepetitionBounds
+(int&,int&,System.Text.RegularExpressions.RegexOptions)
+in <0x0070f> System.Text.RegularExpressions.Syntax.Parser:ParseGroup
+(System.Text.RegularExpressions.Syntax.Group,System.Text.RegularExpressions.RegexOptions,System.Text.RegularExpressions.Syntax.Assertion)
+in <0x00087>
+System.Text.RegularExpressions.Syntax.Parser:ParseRegularExpression
+(string,System.Text.RegularExpressions.RegexOptions)
+in <0x00094> System.Text.RegularExpressions.Regex:.ctor
+(string,System.Text.RegularExpressions.RegexOptions)
+in <0x00012> System.Text.RegularExpressions.Regex:.ctor (string)
+in <0x00022> t1:Main (string[])
+
+
+Expected Results:
+None of those nasty exception things.