[Mono-bugs] [Bug 57228][Wis] New - Balancing regex do not work properly

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Mon, 19 Apr 2004 11:34:42 -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 eric.durand-tremblay.1@ulaval.ca.

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

--- shadow/57228	2004-04-19 11:34:42.000000000 -0400
+++ shadow/57228.tmp.1195	2004-04-19 11:34:42.000000000 -0400
@@ -0,0 +1,43 @@
+Bug#: 57228
+Product: Mono: Class Libraries
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: System
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: eric.durand-tremblay.1@ulaval.ca               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Balancing regex do not work properly
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+Balancing regex construct is not properly implemented in the interpreter.
+
+Steps to reproduce the problem:
+
+Create a standard parenthesis matching regex.
+Regex regex = new
+Regex(@"(((?<foo>\()[^()]*)+((?<bar-foo>\))[^()]*)+)+(?(foo)(?!))");
+regex.IsMatch("((a(b))c");
+
+Actual Results:
+Syntax error, too mutch ')'
+
+Expected Results:
+When tested with NUnit : 
+"Pass. Group[0]=(0,9) Group[1]=(0,9) Group[2]=(0,1)(1,2)(3,2)
+Group[3]=(5,1)(6,2)(8,1) Group[4]= Group[5]=(4,1)(2,4)(1,7)
+
+How often does this happen? 
+Always
+
+Additional Information:
+I already corrected this bug + some group mismatch and failure to match.