[Mono-bugs] [Bug 577346] New: Regex constructor throws ArgumentException: range in reverse order

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Feb 5 03:07:06 EST 2010


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

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


           Summary: Regex constructor throws ArgumentException: range in
                    reverse order
    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; Tablet PC 2.0; Zune 4.0)

new Regex("[\\177-\\377]") throws ArgumentException



Reproducible: Always

Actual Results:  
Unhandled Exception: System.ArgumentException: parsing "[\177-\377]" - [55-51]
range in reverse order.
Parameter name: [\177-\377]

  at System.Text.RegularExpressions.Syntax.Parser.ParseCharacterClass
(RegexOptions options) [0x00000] in <filename unknown>:0
  at System.Text.RegularExpressions.Syntax.Parser.ParseGroup
(System.Text.RegularExpressions.Syntax.Group group, RegexOp
tions options, System.Text.RegularExpressions.Syntax.Assertion assertion)
[0x00000] in <filename unknown>:0
  at System.Text.RegularExpressions.Syntax.Parser.ParseRegularExpression
(System.String pattern, RegexOptions options) [0x00000] in <filename unknown>:0
  at System.Text.RegularExpressions.Regex.CreateMachineFactory (System.String
pattern, RegexOptions options) [0x00000] in <filename unknown>:0
  at System.Text.RegularExpressions.Regex.InitNewRegex () [0x00000] in
<filename unknown>:0
  at System.Text.RegularExpressions.Regex.Init () [0x00000] in <filename
unknown>:0
  at System.Text.RegularExpressions.Regex..ctor (System.String pattern,
RegexOptions options) [0x00000] in <filename unknown>:0
  at System.Text.RegularExpressions.Regex..ctor (System.String pattern)
[0x00000] in <filename unknown>:0

Expected Results:  
No exception, \177 and \377 should be interpreted as octal escapes.

Prevents IronRuby to run Ruby on Rails.

-- 
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