[Mono-bugs] [Bug 35860][Wis] New - Regex.Split Error

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
18 Dec 2002 19:07:58 -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 spam0@sonicated.com.

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

--- shadow/35860	Wed Dec 18 14:07:58 2002
+++ shadow/35860.tmp.14029	Wed Dec 18 14:07:58 2002
@@ -0,0 +1,61 @@
+Bug#: 35860
+Product: Mono/Runtime
+Version: unspecified
+OS: other
+OS Details: Debian Unstable 2.4.19-xfs/WindowsXP
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: spam0@sonicated.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Regex.Split Error
+
+Description of Problem:
+Regex.Split returns blank strings.
+
+Steps to reproduce the problem:
+1. Compile RegexTest.cs (given below).
+2. Run with mono/mint.
+
+Actual Results:
+--- Output ---
+ 0
+ 1
+---
+
+Expected Results:
+--- Output ---
+Hello 0
+World! 1
+---
+
+Additional Information:
+I get the "Expected Results" in Windows when run with the MS runtime. I get
+the "Actual Results" when run with mono/mint on Windows and Linux. 
+
+The same error happends regardless of which compiler was used (mcs, csc)
+and on which platform it is compiled (Linux, Windows).
+
+--- RegexTest.cs ---
+using System;
+using System.Text.RegularExpressions;
+
+class RegexTest {
+	public static void Main(string [] args){
+		string str = "Hello world!";
+		string [] strArray =  Regex.Split(str, " ");
+		
+		int i = 0;
+		
+		foreach (string subString in strArray){
+			Console.WriteLine(subString + " " + i++);
+		}
+	}
+}
+---