How can i remove from a List<string> that contain url's with specific strings in the url's?
<p>I have this code:</p>

<pre><code>private void button6_Click(object sender, EventArgs e)
{
    crawlLocaly1 = new CrawlLocaly();
    crawlLocaly1.StartPosition = FormStartPosition.CenterParent;
    DialogResult dr = crawlLocaly1.ShowDialog(this);
    if (dr == DialogResult.Cancel)
    {
        crawlLocaly1.Close();
    }
    else if (dr == DialogResult.OK)
    {
        LocalyKeyWords.Add(crawlLocaly1.getText() + "," + mainUrl);
        crawlLocaly1.Close();
    }
}
</code></pre>

<p>When the user click the button6 it open a new Form with a textBox the user type in a keyword that can be a url or can be just a word. 
When the user clicks OK it's doing the line:</p>

<pre><code>LocalyKeyWords.Add(crawlLocaly1.getText() + "," + mainUrl);
</code></pre>

<p>LocalyKeyword is a List and crawlLocaly1 is a new Form where im getting the text the user type in the textBox. </p>

<p>mainUrl is the current url.</p>

<p>So if the mainUrl is for example <a href="http://www.google.com" rel="nofollow">http://www.google.com</a></p>

<p>And the user typed in: Daniel</p>

<p>So in LocalyKeyWords List in index 0 I will see: Daniel,http://www.google.com
So I know that the keyword Daniel belong to <a href="http://www.google.com" rel="nofollow">http://www.google.com</a></p>

<p>Now I have this code:</p>

<pre><code>private void removeExternals(List&lt;string&gt; externals)
{

}
</code></pre>

<p>Now the user can change and set the mainUrl at any time. 
I need that in the function removeExternals to check what the mainUrl is now and then to find the url in the List LocalyKeyWords and then to remove from the List externals all the places that the keyword that belong to the url in the LocalyKeyWords.</p>

<p>For example the mainUrl is now <a href="http://www.google.com" rel="nofollow">http://www.google.com</a>
So I need to find what keyword belong to <a href="http://www.google.com" rel="nofollow">http://www.google.com</a>
For example the keyword is Daniel: Daniel,http://www.google.com</p>

<p>So now remove all the places in the List externals that contain the keyword Daniel</p>
