Skip to content

Latest commit

 

History

History
155 lines (88 loc) · 6.61 KB

File metadata and controls

155 lines (88 loc) · 6.61 KB

Pattern.Replace Method

Home

Containing Type: Pattern

Assembly: Pihrtsoft.Text.RegularExpressions.Linq.dll

Overloads

Method Summary
Replace(String) Within a specified input string, replaces strings that match the current instance with an empty string.
Replace(String, MatchEvaluator) Within a specified input string, replaces all strings that match the current instance with a string returned by a MatchEvaluator delegate.
Replace(String, MatchEvaluator, RegexOptions) Within a specified input string, replaces all strings that match the current instance with a string returned by a MatchEvaluator delegate. Specified options modify the matching operation.
Replace(String, String) Within a specified input string, replaces all strings that match the current instance with a specified replacement string.
Replace(String, String, RegexOptions) Within a specified input string, replaces all strings that match the current instance with a specified replacement string. Specified options modify the matching operation.

Replace(String)


Within a specified input string, replaces strings that match the current instance with an empty string.

public string Replace(string input)

Parameters

inputString

The string to search for a match.

Returns

String

Exceptions

ArgumentNullException

input is null.

Replace(String, MatchEvaluator)


Within a specified input string, replaces all strings that match the current instance with a string returned by a MatchEvaluator delegate.

public string Replace(string input, System.Text.RegularExpressions.MatchEvaluator evaluator)

Parameters

inputString

The string to search for a match.

evaluatorMatchEvaluator

A method that examines each match and returns a replacement string.

Returns

String

Exceptions

ArgumentNullException

input or evaluator is null.

Replace(String, MatchEvaluator, RegexOptions)


Within a specified input string, replaces all strings that match the current instance with a string returned by a MatchEvaluator delegate. Specified options modify the matching operation.

public string Replace(string input, System.Text.RegularExpressions.MatchEvaluator evaluator, System.Text.RegularExpressions.RegexOptions options)

Parameters

inputString

The string to search for a match.

evaluatorMatchEvaluator

A method that examines each match and returns a replacement string.

optionsRegexOptions

A bitwise combination of the enumeration values that specify options for matching.

Returns

String

Exceptions

ArgumentNullException

input or evaluator is null.

Replace(String, String)


Within a specified input string, replaces all strings that match the current instance with a specified replacement string.

public string Replace(string input, string replacement)

Parameters

inputString

The string to search for a match.

replacementString

The replacement string.

Returns

String

Replace(String, String, RegexOptions)


Within a specified input string, replaces all strings that match the current instance with a specified replacement string. Specified options modify the matching operation.

public string Replace(string input, string replacement, System.Text.RegularExpressions.RegexOptions options)

Parameters

inputString

The string to search for a match.

replacementString

The replacement string.

optionsRegexOptions

A bitwise combination of the enumeration values that specify options for matching.

Returns

String