I have read similar questions but I can't get this to work. I want to use the regex for the Find-Replace Visual Studio tool that supports C# regular expressions.

I want to find (and replace with nothing) expressions such as:

```
System.Collections.Generic.List
System.Web.UI.WebControls.Button

```

And remove `System.Collections.Generic.` and `System.Web.UI.WebControls` to tidy my code up.

BUT I want the ability to add new words after 'System.' to the expression if I want to scale it. So I have created this:

`(System\.)?(Collections\.)?(Generic\.)?(Web\.)?(UI\.)?(WebControls\.)?`

However, this also changes using statements such as:

`using System.Data.SqlClient;`

Is there a way to alter my regular expression so that it does not include matches that start with the "using" keyword? 

I have tried using:

`(^?!using)(System\.)?(Collections\.)?(Generic\.)?(Web\.)?(UI\.)?(WebControls\.)?`

but this does not work. Thanks!