[Mono-bugs] [Bug 22925] New - problem with Regex and String literals

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
2 Apr 2002 06:48:33 -0000


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 manyoso@yahoo.com.

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

--- shadow/22925	Tue Apr  2 01:48:33 2002
+++ shadow/22925.tmp.8782	Tue Apr  2 01:48:33 2002
@@ -0,0 +1,51 @@
+Bug#: 22925
+Product: Mono/Runtime
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: manyoso@yahoo.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: problem with Regex and String literals
+
+using System;
+using System.Text.RegularExpressions;
+
+class Foo {
+
+        public static void Main (string[] args)
+        {
+                Console.WriteLine (IsAnything("blah"));
+                Console.WriteLine (IsWhiteSpace(" "));
+        }
+
+        public static bool IsAnything (String str)
+        {
+                return Regex.IsMatch (str, @".*");
+        }
+
+        public static bool IsWhiteSpace (String str)
+        {
+                return Regex.IsMatch (str, @"\s");
+        }
+}
+
+produces.......
+
+manyoso@manyoso:~/dev/csharp/makeup$ mcs Foo.cs 
+Needed to allocate blacklisted block at 0x8464000
+RESULT: 0
+manyoso@manyoso:~/dev/csharp/makeup$ mint Foo.exe 
+
+(process:7517): ** ERROR **: file tramp.c: line 455 
+(mono_create_method_pointer): should not be reached
+aborting...
+Trace/breakpoint trap