<p>I need a regex that matches all strings ending in .cs, but if they end in .g.cs they should not match. I'm using .NET regular expressions.</p>

This will match the end if it's .cs but not .g.cs
```
```
(?<!\.g)\.cs$
```
```
For the entire string start to finish, something like this:
```
```
^.*(?<!\.g)\.cs$
```
```