Skip to content

Instantly share code, notes, and snippets.

@money4honey
Created August 6, 2015 18:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save money4honey/dd619ba7f12023ba5bdc to your computer and use it in GitHub Desktop.
Save money4honey/dd619ba7f12023ba5bdc to your computer and use it in GitHub Desktop.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace myClasses
{
public class ReplaceMaster
{
public static string replaceMatches(string text, string[] arrayFind, string replace)
{
foreach (string line in arrayFind) {
if (text.Contains(line)) text = text.Replace(line, replace);
}
return text;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment