Name
Match
Properties
public bool Success
Indicates whether the match was successful.
public string Value
Text of the match.
public int Length
Number of characters in the matched text.
public int Index
Zero-based character index of the start of the match.
public GroupCollection Groups
A
GroupCollection
object whereGroups[0].value
contains the text of the entire match, and each additionalGroups
element contains the text matched by a capture group.
Methods
public Match NextMatch( )
Return a
Match
object for the next match of the regex in the input string.public virtual string Result(string
result
)
Return
result
with special replacement sequences replaced by values from the previous match.public static Match Synchronized(Match
inner
)
Return a
Match
object identical toinner
, except also safe for multithreaded use.
Get Regular Expression Pocket Reference now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.