[Mono-bugs] [Bug 541823] New: Regex class doesn't match when it should
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Thu Sep 24 11:39:32 EDT 2009
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: mono-bugs at lists.ximian.com
ReportedBy: tedu at fogcreek.com
QAContact: mono-bugs at lists.ximian.com
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.
More information about the mono-bugs
mailing list