ok thanks for the help guys I was able to use solution 3 and this is what I came up with
string s = textBox1.Text;
string[] arr = new string[]
{
"cat",
"dog",
"panther",
"tiger"
};
foreach (var name in arr)
{
if (s.Contains(name))
{
s = s.Replace(name, "****");
}
else
{
textBox2.Text = s;
}
however it will work but it don't read the last word in this case tiger