BuildMaster SDK Reference
Version:

Replace(string input, System.Text.RegularExpressions.MatchEvaluator evaluator, int count) Method

Within a specified input string, replaces a specified maximum number of strings that match a regular expression pattern with a string returned by a System.Text.RegularExpressions.MatchEvaluator delegate.

Syntax

public string Replace(string input, System.Text.RegularExpressions.MatchEvaluator evaluator, int count)

Parameters

input
Type: string

The string to search for a match.

evaluator
Type: System.Text.RegularExpressions.MatchEvaluator

A custom method that examines each match and returns either the original matched string or a replacement string.

count
Type: int

The maximum number of times the replacement will occur.

Returns

A new string that is identical to the input string, except that a replacement string takes the place of each matched string.

Exceptions

System.ArgumentNullException

input or evaluator is null (Nothing in Visual Basic).