[Mono-bugs] [Bug 71077][Min] New - The result of regular expression [\s\S] is different from MS.NET.
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Fri, 7 Jan 2005 02:16:21 -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 mei@work.email.ne.jp.
http://bugzilla.ximian.com/show_bug.cgi?id=71077
--- shadow/71077 2005-01-07 02:16:21.000000000 -0500
+++ shadow/71077.tmp.2401 2005-01-07 02:16:21.000000000 -0500
@@ -0,0 +1,54 @@
+Bug#: 71077
+Product: Mono: Class Libraries
+Version: 1.1
+OS: All
+OS Details:
+Status: NEW
+Resolution:
+Severity: 001 One hour
+Priority: Minor
+Component: System
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: mei@work.email.ne.jp
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: The result of regular expression [\s\S] is different from MS.NET.
+
+using System;
+using System.Text.RegularExpressions;
+
+class X {
+ public static void Main ()
+ {
+ string s = "\n";
+ string p = @"[\s\S]"; // =Category.Any
+
+ if (Regex.IsMatch (s, p))
+ Console.WriteLine ("OK");
+ else
+ Console.WriteLine ("NG");
+ }
+}
+
+Mono Results:
+$ mono xxx.exe
+NG
+
+MS.NET Results:
+$ xxx.exe
+OK
+
+Additional Information:
+mcs/class/System/System.Text.RegularExpressions/category.cs (221)
+
+now:
+case Category.Any:
+ return c != '\n';
+
+fix:
+case Category.Any:
+ return true;
+
+see Bug #69269 too.