[Mono-bugs] [Bug 76345][Min] Changed - Regex doesn't seem to handle negated character class after a repeat

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Fri Apr 7 07:28:21 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 rharinath at novell.com.

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

--- shadow/76345	2006-01-15 11:30:25.000000000 -0500
+++ shadow/76345.tmp.16935	2006-04-07 07:28:21.000000000 -0400
@@ -5,19 +5,19 @@
 OS Details: 
 Status: NEW   
 Resolution: 
 Severity: Unknown
 Priority: Minor
 Component: System
-AssignedTo: mono-bugs at ximian.com                            
+AssignedTo: rharinath at novell.com                            
 ReportedBy: ckknight at gmail.com               
 QAContact: mono-bugs at ximian.com
 TargetMilestone: ---
 URL: 
 Cc: 
-Summary: Regex not recognizing [^\\]
+Summary: Regex doesn't seem to handle negated character class after a repeat
 
 Please fill in this template when reporting a bug, unless you know what you
 are doing.
 Description of Problem:
 /".*?[^\\]"/ ( new Regex("\".*?[^\\\\]\"") ) is supposed to match a string
 like "asdf" or "as\"df".
@@ -50,6 +50,27 @@
 Additional Information:
 
 ------- Additional Comments From Gareth at bleewraa.com  2006-01-15 11:30 -------
 Looks to be a similar if not the same problem as bug #72166
 
 http://bugzilla.ximian.com/show_bug.cgi?id=72166
+
+------- Additional Comments From rharinath at novell.com  2006-04-07 07:28 -------
+Here's an alternate set of tests that's more readable :-)
+
+using System;
+using System.Text.RegularExpressions;
+
+class Foo {
+        static void Main ()
+        {
+                Console.WriteLine (new
+Regex("'.*?'").Match("'asdf'").Value);
+                Console.WriteLine (new
+Regex("'[^,,].*?'").Match("'asdf'").Value);
+                Console.WriteLine (new
+Regex("'.*[^,]'").Match("'asdf'").Success);
+                Console.WriteLine (new
+Regex("'.*[^,]'").Match("'as,'df'").Success);
+        }
+}
+


More information about the mono-bugs mailing list