[Mono-bugs] [Bug 52924][Min] New - ArgumentException using braces in Regex constructor.

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Fri, 16 Jan 2004 03:51:35 -0500 (EST)


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 joergr@voelcker.com.

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

--- shadow/52924	2004-01-16 03:51:35.000000000 -0500
+++ shadow/52924.tmp.7367	2004-01-16 03:51:35.000000000 -0500
@@ -0,0 +1,58 @@
+Bug#: 52924
+Product: Mono/Class Libraries
+Version: unspecified
+OS: Suse 8.2
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Minor
+Component: System
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: JoergR@voelcker.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: ArgumentException using braces in Regex constructor.
+
+Description of Problem:
+Unmasked braces in expression (i.e. "{\w+}") lead to an ArgumentException
+in the constructor of Regex.
+
+Steps to reproduce the problem:
+1. Compile attached sample.
+2. Run it.
+
+Actual Results:
+Unhandled Exception: System.ArgumentException: parsing "{\w+}" - Bad
+quantifier.
+Parameter name: {\w+}
+in [0x00273] (at
+/home/viadmin/mono/mcs/class/System/System.Text.RegularExpressions/parser.cs:255)
+System.Text.RegularExpressions.Syntax.Parser:ParseGroup
+(System.Text.RegularExpressions.Syntax.Group,System.Text.RegularExpressions.RegexOptions,System.Text.RegularExpressions.Syntax.Assertion)
+in [0x00035] (at
+/home/viadmin/mono/mcs/class/System/System.Text.RegularExpressions/parser.cs:118)
+System.Text.RegularExpressions.Syntax.Parser:ParseRegularExpression
+(string,System.Text.RegularExpressions.RegexOptions)
+in [0x0003a] (at
+/home/viadmin/mono/mcs/class/System/System.Text.RegularExpressions/regex.cs:154)
+System.Text.RegularExpressions.Regex:.ctor
+(string,System.Text.RegularExpressions.RegexOptions)
+in [0x00003] (at
+/home/viadmin/mono/mcs/class/System/System.Text.RegularExpressions/regex.cs:141)
+System.Text.RegularExpressions.Regex:.ctor (string)
+in [0x00005] (at
+/home/viadmin/projekte/Prototypes/Joerg/Mono/Mono-Bugs/RegularExpression3.cs:9)
+.Test:Main ()
+
+
+Expected Results:
+No error.
+
+How often does this happen? 
+Always.
+
+Additional Information:
+Works using MS.NET. Workaround: Mask braces using backslash.