System.Text.RegularExpressions.MatchEvaluator Delegate

Assembly: System.dll
Namespace: System.Text.RegularExpressions
Summary
The delegate that is called each time a regular expression match is found during a Regex.Replace operation.
C# Syntax:
[Serializable]
public delegate string MatchEvaluator(Match match);
Parameters:
The declaration of your event handler must have the same parameters as the MatchEvaluator delegate declaration.

match

The Match resulting from a single regular expression match during a Replace.

Remarks
You can use MatchEvaluator to perform custom verifications or operations at each Replace operation. For each match, your MatchEvaluator is called. Its return value is used as the replacement for the match passed in, and it can do any arbitrary processing to generate the replacement.
See also:
System.Text.RegularExpressions Namespace

Hierarchy:

Top of page

Copyright (c) 2002 Microsoft Corporation. All rights reserved.