title: C# - Find and remove substring from a list of strings
body: <p>I have a bad word list. If a string contains any of item/items from the bad word list, I need to remove that bad word from the string. </p>
  
  <pre><code>List&lt;string&gt; badWordList = new List&lt;string&gt; { "email:", "index", "mobile:", "fax:", "web" };
  </code></pre>
  
  <p>I am able to search the string but not able to remove. Please help me out...I tried below code:</p>
  
  <pre><code>string myText = "email:abc@gmail.com";
  if (badWordList.Any(w =&gt; myText.IndexOf(w, StringComparison.OrdinalIgnoreCase) &gt;= 0))
  {
      // How to remove
  }
  </code></pre>
  
  <p>Below is the set of input of expected output:</p>
  
  <ol>
  <li><p>i/p- email:abc@gmail.com  </p>
  
  <p>o/p - abc@gmail.com</p></li>
  <li><p>i/p- Jack F. Mobile:89788987</p>
  
  <p>o/p- Jack F. 89788987</p></li>
  <li><p>i/p- Jack F. Email:t@p.c mobile:65777 WEB</p>
  
  <p>o/p- Jack F. t@p.c 65777</p></li>
  </ol>
  
  <p>I would prefer a non-regex approach. Thanks for your help.</p>