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

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sun May 31 15:53:51 EDT 2009


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

User nospam at aijk.org added comment
http://bugzilla.novell.com/show_bug.cgi?id=474154#c1


Ian Green <nospam at aijk.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nospam at aijk.org




--- Comment #1 from Ian Green <nospam at aijk.org>  2009-05-31 13:53:49 MDT ---
In case it helps, the difference in behaviour between 
  Regex.Match(target, offset)
and
  Regex.Match(target, offset, maxlength)

. is also noted by Jeff Friedl in his book "Regular Expressions" (3rd edition,
pages 421-2). As he says, the Microsoft documentation is atrocious, so it may
be unclear what Microsoft intended. Jeff's statement is:

"If you provide a maxlength argument, it puts matching into a special mode
where the maxlength characters starting offset characters into the target
string are taken as the entire target string, as far as the regex engine is
concerned." (i.e. confirming what David said above about Substring)

He also gives a couple of examples on page 422.

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