[Mono-bugs] [Bug 566117] New: Regex.Split behavior differs from .NET

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Dec 18 15:05:12 EST 2009


http://bugzilla.novell.com/show_bug.cgi?id=566117

http://bugzilla.novell.com/show_bug.cgi?id=566117#c0


           Summary: Regex.Split behavior differs from .NET
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.6.x
          Platform: x86
        OS/Version: Windows 7
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: System
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: tomas.matousek at microsoft.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


User-Agent:       Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1;
Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729;
Media Center PC 6.0; InfoPath.3; MS-RTC LM 8; MALC)

using System;
using System.Text.RegularExpressions;

public class C {
    public static void Main() {
        var r = new Regex("(el)|(xx)");
        foreach (var s in r.Split("hello")) {
            Console.WriteLine("'{0}'", s);
        }
    }
}

Reproducible: Always

Steps to Reproduce:
compile and run the code
Actual Results:  
'h'
'el'
''
'lo'

Expected Results:  
'h'
'el'
'lo'

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list