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 [EMAIL PROTECTED] http://bugzilla.ximian.com/show_bug.cgi?id=77626 --- shadow/77626 2006-02-23 14:02:56.000000000 -0500 +++ shadow/77626.tmp.2766 2006-02-23 14:02:56.000000000 -0500 @@ -0,0 +1,78 @@ +Bug#: 77626 +Product: Mono: Class Libraries +Version: unspecified +OS: All +OS Details: +Status: NEW +Resolution: +Severity: +Priority: Normal +Component: System +AssignedTo: [EMAIL PROTECTED] +ReportedBy: [EMAIL PROTECTED] +QAContact: [EMAIL PROTECTED] +TargetMilestone: --- +URL: +Cc: +Summary: Regex bug which character classes + +Please fill in this template when reporting a bug, unless you know what you +are doing. +Description of Problem: + +This may be a duplicate of bug #77363, but I've simplied the test case +dramatically. + + +using System; +using System.Collections.Generic; +using System.Text; +using System.Text.RegularExpressions; + +namespace RegexBug +{ + class Program + { + static void Main(string[] args) + { + + if (Regex.IsMatch("mT1[", @"m[0-9A-Za-z_-]+\[")) { + Console.WriteLine("matched"); + } else { + Console.WriteLine("does not match"); + } + + if (Regex.IsMatch("mT1[", @"m[-0-9A-Za-z_]+\[")) { + Console.WriteLine("matched"); + } else { + Console.WriteLine("does not match"); + } + + } + } +} + + +Steps to reproduce the problem: +1. Run my test case +2. +3. + +Actual Results: + +matched +does not match + +Expected Results: +matched +matched + +How often does this happen? +always + +Additional Information: +looks like the '-' in the character class is not being handled propertly +when it's the first character. Escaping it make it work too, but I don't +think it should be needed. + +my college reports that this used to work in 1.1.12 _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
