Name
MatchEvaluator
Synopsis
This delegate can be called
when a match is
found during a replace
operation. Several versions
of the overloaded Regex.Replace( )
method take a
MatchEvaluator
as a parameter.
Regex.Replace( )
walks through a search string
looking for matches to a given expression and replaces each match
using a specified replacement string. The
MatchEvaluator
delegate can be called on each
match, getting passed the match result as a Match
object.
public delegate string MatchEvaluator(Match match
);
Passed To
Regex.Replace( )
Get C# in a Nutshell, Second Edition 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.