```
var g = urls;
if (g.Count > 1)
{
     for(int i = g.Count - 1; i > 0; i--)
     {
          if (!g[i].Contains("Test"))
          {
                g.RemoveAt(i);
          }
     }
 }

```

I create a copy of the List then checking for specific string in each item but there are 23 items left in g one of them is not containing the word "Test" but was not removed it's the first item in the list at index 0.