/// <summary> /// Returns a copy of this string with text replaced using a regular expression and a /// replacement function. /// </summary> /// <param name="thisObject"></param> /// <param name="regExp"> The regular expression to search for. </param> /// <param name="replaceFunction"> A function that is called to produce the text to replace /// for every successful match. </param> /// <returns> A copy of this string with text replaced using a regular expression. </returns> public static string Replace(string thisObject, RegExpInstance regExp, FunctionInstance replaceFunction) { return(regExp.Replace(thisObject, replaceFunction)); }
/// <summary> /// Returns a copy of this string with text replaced using a regular expression. /// </summary> /// <param name="thisObject"></param> /// <param name="regExp"> The regular expression to search for. </param> /// <param name="replaceText"> A string containing the text to replace for every successful match. </param> /// <returns> A copy of this string with text replaced using a regular expression. </returns> public static string Replace(string thisObject, RegExpInstance regExp, string replaceText) { return(regExp.Replace(thisObject, replaceText)); }