This documentation is archived and is not being maintained.

Regex.Replace Method (String, String)

.NET Framework 1.1

Replaces all occurrences of a specified regular expression pattern with a replacement string, starting at the first character in the input string.

[Visual Basic]
Overloads Public Function Replace( _
   ByVal input As String, _
   ByVal replacement As String _
) As String
[C#]
public string Replace(
 string input,
 string replacement
);
[C++]
public: String* Replace(
 String* input,
 String* replacement
);
[JScript]
public function Replace(
   input : String,
 replacement : String
) : String;

Parameters

input
The string to modify.
replacement
The replacement string.

Return Value

The modified character string.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework

See Also

Regex Class | Regex Members | System.Text.RegularExpressions Namespace | Regex.Replace Overload List

Show: