.NET Framework Class Library
Regex..::.Replace Method

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

Overload List

  NameDescription
Public methodSupported by the .NET Compact FrameworkSupported by the XNA FrameworkReplace(String, String)Within a specified input string, replaces all strings that match a regular expression pattern with a specified replacement string.
Public methodSupported by the .NET Compact FrameworkSupported by the XNA FrameworkReplace(String, MatchEvaluator)Within a specified input string, replaces all strings that match a specified regular expression with a string returned by a MatchEvaluator delegate.
Public methodSupported by the .NET Compact FrameworkSupported by the XNA FrameworkReplace(String, String, Int32)Within a specified input string, replaces a specified maximum number of strings that match a regular expression pattern with a specified replacement string.
Public methodStatic memberSupported by the .NET Compact FrameworkSupported by the XNA FrameworkReplace(String, String, String)Within a specified input string, replaces all strings that match a specified regular expression with a specified replacement string.
Public methodStatic memberSupported by the .NET Compact FrameworkSupported by the XNA FrameworkReplace(String, String, MatchEvaluator)Within a specified input string, replaces all strings that match a specified regular expression with a string returned by a MatchEvaluator delegate.
Public methodSupported by the .NET Compact FrameworkSupported by the XNA FrameworkReplace(String, MatchEvaluator, Int32)Within a specified input string, replaces a specified maximum number of strings that match a regular expression pattern with a string returned by a MatchEvaluator delegate.
Public methodSupported by the .NET Compact FrameworkSupported by the XNA FrameworkReplace(String, String, Int32, Int32)Within a specified input substring, replaces a specified maximum number of strings that match a regular expression pattern with a specified replacement string.
Public methodStatic memberSupported by the .NET Compact FrameworkSupported by the XNA FrameworkReplace(String, String, String, RegexOptions)Within a specified input string, replaces all strings that match a specified regular expression with a specified replacement string. Specified options modify the matching operation.
Public methodStatic memberSupported by the .NET Compact FrameworkSupported by the XNA FrameworkReplace(String, String, MatchEvaluator, RegexOptions)Within a specified input string, replaces all strings that match a specified regular expression with a string returned by a MatchEvaluator delegate. Specified options modify the matching operation.
Public methodSupported by the .NET Compact FrameworkSupported by the XNA FrameworkReplace(String, MatchEvaluator, Int32, Int32)Within a specified input substring, replaces a specified maximum number of strings that match a regular expression pattern with a string returned by a MatchEvaluator delegate.
Top
See Also

Reference

Tags :


Community Content

rtm242
Replacement String == Replacement Pattern
See link on "Substitutions":
http://msdn.microsoft.com/en-us/library/ewy2t5e0.aspx
Tags : regex

Karthik_Seshu
Log of regex
Hi,
I would like to log the before and after replcaement string/line to a log file as a part of the replace operation to a text file. Is that possible? if not Is there any other way to achieve the same?

Tags :

Page view tracker