Share via


Replace Method

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

In a specified input string, replaces strings that match a regular expression pattern with a specified replacement string.

This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.

Overload List

  Name Description
Public method Replace(String, String) In a specified input string, replaces all strings that match a regular expression pattern with a specified replacement string.
Public method Replace(String, String, Int32, Int32) In a specified input substring, replaces a specified maximum number of strings that match a regular expression pattern with a specified replacement string.

Top

See Also

Reference

Regex Class

System.Text.RegularExpressions Namespace