[Mono-dev] Regex.Match(string, int, int) behaves differently than Microsoft's implementation

Miguel de Icaza miguel at novell.com
Mon Mar 22 15:54:10 EDT 2010


Hello,

> Text of the bug report is as follows:
> Certain regular expressions will behave differently on Mono when calling
> Regex.Match(string, int, int). In particular the expression
>
> new Regex("^quick$").Match("The quick brown fox jumps over the lazy dog.", 4,
> 5).Success
>
> evaluates to true in Microsoft's implementation, but false in Mono. It appears
> that in Microsoft's implementation, the results of the method are comparable to
> calling string.Substring() on the string being passed in, except that indexes
> are still reported in terms of the original string.

Seems like a genuine bug to me.    I do not think there is anything like a quick
fix, only the correct fix.

Miguel.


More information about the Mono-devel-list mailing list