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


           Summary: Regex class doesn't match when it should
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.4.x
          Platform: Other
        OS/Version: Ubuntu
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: System
        AssignedTo: [email protected]
        ReportedBy: [email protected]
         QAContact: [email protected]
          Found By: ---


Created an attachment (id=319736)
 --> (http://bugzilla.novell.com/attachment.cgi?id=319736)
testcase

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.12)
Gecko/20080207 Ubuntu/7.10 (gutsy) Firefox/2.0.0.12

The Regex class is not matching a regular expression that I expect to match. 
Works with MS .NET.

Reproducible: Always

Steps to Reproduce:
1. see attached test case

sing System.Text.RegularExpressions;

class ReTest {


        private static void testRE(string s)
        {
                Regex re = new
Regex(@"^(Case|Bug|BugzID|Waffle)?[\s]*(\d+)(\s)*$");
                Console.WriteLine("testing " + s);
                if (re.IsMatch(s))
                        Console.WriteLine("match");
                else
                        Console.WriteLine("fail");

        }

        public static void Main() {

                testRE("Case 1");
                testRE("Bug 1");
                testRE("BugzID 1");
                testRE("Waffle 1");


        }
}
Actual Results:  
testing Case 1
match
testing Bug 1
match
testing BugzID 1
fail
testing Waffle 1
match


Expected Results:  
testing BugzID 1
match
testing Case 1
match
testing Bug 1
match

-- 
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.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to