[Mono-bugs] [Bug 476410] New: Regex does not consider range subtraction (foo-[\xMM-\xNN])
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Tue Feb 17 06:48:22 EST 2009
https://bugzilla.novell.com/show_bug.cgi?id=476410
Summary: Regex does not consider range subtraction
(foo-[\xMM-\xNN])
Classification: Mono
Product: Mono: Class Libraries
Version: unspecified
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: P5 - None
Component: System
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: atsushi at ximian.com
QAContact: mono-bugs at lists.ximian.com
Found By: ---
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.6)
Gecko/2009011913 Firefox/3.0.6 (.NET CLR 3.5.30729)
In the example repro, Regex.IsMatch() shows unexpected mismatch.
In general, pattern exclusion works (such as commented line above), but when it
is specified by character range, it doesn't.
Reproducible: Always
Steps to Reproduce:
using System;
using System.Text.RegularExpressions;
public class Test
{
public static void Main ()
{
//string pattern = @"([\p{IsBasicLatin}-\x80])+";
string pattern = @"([\p{IsBasicLatin}-[\x80-\xFF]])+";
string target = "application";
Console.WriteLine (Regex.IsMatch (target, pattern));
}
}
Actual Results:
False
Expected Results:
True
--
Configure bugmail: https://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