Replace() публичный Метод

Returns a copy of the given string with text replaced using a regular expression.
public Replace ( string input, FunctionInstance replaceFunction ) : string
input string The string on which to perform the search.
replaceFunction FunctionInstance A function that is called to produce the text to replace /// for every successful match.
Результат string
Пример #1
0
 /// <summary>
 /// Returns a copy of this string with text replaced using a regular expression and a
 /// replacement function.
 /// </summary>
 /// <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);
 }
Пример #2
0
 /// <summary>
 /// Returns a copy of this string with text replaced using a regular expression and a
 /// replacement function.
 /// </summary>
 /// <param name="thisObject"> The string that is being operated on. </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));
 }
Пример #3
0
 /// <summary>
 /// Returns a copy of this string with text replaced using a regular expression.
 /// </summary>
 /// <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);
 }
Пример #4
0
 /// <summary>
 /// Returns a copy of this string with text replaced using a regular expression.
 /// </summary>
 /// <param name="thisObject"> The string that is being operated on. </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));
 }