I've found lots of questions on here on how to exclude a substring from results, but I want to exclude lines that are exact matches and simply can't figure out how to do it.

With the test data below, how would I match everything *except* for `11` and `111`?

```
0
1
00
01
10
11
000
001
010
011
100
101
110
111
0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
1010

```

I've tried various things, such as this:

```
^((?!11|111).)*$

```

But that excludes substring matches, when again I'm wanting to exclude exact matches.

Is this possible with regex? If so, how can excluding *exact* matches be achieved?