public static RemoveMatches ( string str, IList |
||
str | string | String to process |
matches | IList |
List of matches of a regex on this string |
return | string |
public static string RemoveMatches(string str, IList<Match> matches)
{
if (matches.Count == 0) return str;
StringBuilder sb = new StringBuilder(str);
for (int i = matches.Count - 1; i >= 0; i--)
{
sb.Remove(matches[i].Index, matches[i].Value.Length);
}
return sb.ToString();
}
Tools::RemoveMatches ( string str, |