Result Method

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Returns the expansion of the specified replacement pattern.

Namespace:  System.Text.RegularExpressions
Assembly:  System.Text.RegularExpressions (in System.Text.RegularExpressions.dll)

public virtual string Result(
	string replacement
)

Parameters

replacement
Type: System..::..String
The replacement pattern to use.

Return Value

Type: System..::..String
The expanded version of the replacement parameter.

Whereas the Regex..::..Replace method replaces all matches in an input string with a specified replacement pattern, the Result method replaces a single match with a specified replacement pattern. Because it operates on an individual match, it is also possible to perform processing on the matched string before you call the Result method.

The replacement parameter is a standard regular expression replacement pattern. It can consist of literal characters and regular expression substitutions.

Show: