I am trying to iterate over an array of strings and check/replace if any of the strings exist in the input string. Using LINQ, this is what i have so far.
string input = "/main/dev.website.com"
string[] itemsToIgnore = { "dev.", "qa.", "/main/" };
string website = itemsToIgnore
.Select(x =>
{ x = input.Replace(x, ""); return x; })
.FirstOrDefault();
When i run this, nothing actually happens and my input string stays the same?