Share via


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)

Syntax

'Declaration
Public Overridable Function Result ( _
    replacement As String _
) As String
public virtual string Result(
    string replacement
)
public:
virtual String^ Result(
    String^ replacement
)
abstract Result : 
        replacement:string -> string 
override Result : 
        replacement:string -> string 
public function Result(
    replacement : String
) : String

Parameters

Return Value

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

Remarks

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.

.NET Framework Security

See Also

Reference

Match Class

System.Text.RegularExpressions Namespace