[Mono-bugs] [Bug 53866][Wis] New - regex engine doesn't handle /S correctly

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Wed, 4 Feb 2004 10:30:51 -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 ianm@activestate.com.

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

--- shadow/53866	2004-02-04 10:30:51.000000000 -0500
+++ shadow/53866.tmp.12667	2004-02-04 10:30:51.000000000 -0500
@@ -0,0 +1,39 @@
+Bug#: 53866
+Product: Mono/Class Libraries
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: System
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: ianm@activestate.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: regex engine doesn't handle /S correctly
+
+System.Text.RegularExpressions
+
+Description of Problem:
+
+a /s/S combination doesn't properly match all whitespace and non witespace
+characters as it does on the .net implementation. Code sample follows:
+
+ public static void Main(string[] args) {
+        string result = @"foo sdsd bar foobar";
+        string expression = @"foo[\s\S]*bar";       
+        Match match = Regex.Match(result, expression);
+        if (match.Success) {
+            Console.WriteLine("found a match" );
+        }
+        else {
+            Console.WriteLine( "didn't find one");
+        }
+    }
+
+In the example it should successfully match - [/s/S]* should match the
+'sdsd' part of the string. However it does not on mono.