Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Extension method: string RegexReplaceIgnoreCase(this string, string, MatchEvaluator)

Declaration

public static string RegexReplaceIgnoreCase(
    this string input,
    string pattern,
    MatchEvaluator evaluator
)

Summary

In a specified input string, replaces all strings that match a specified regular expression pattern with a string returned by a match evaluator delegate. The pattern is matched using an invariant-culture case-insensitive match.

Parameters

this stringinput The string to search for a match.
stringpattern The regular expression pattern to match.
MatchEvaluatorevaluator A custom method that examines each match and returns either the original matched string or a replacement string.

Returns

A new string that is identical to the input string, except that a replacement string takes the place of each matched string. If pattern is not matched in the current instance, the method returns the current instance unchanged.