<p>I'm processing a file, line-by-line, and I'd like to do an inverse match.  For instance, I want to match lines where there is a string of six letters, but only if these six letters are not '<em>Andrea</em>'. How should I do that?</p>
<p>I'm using <a href="https://en.wikipedia.org/wiki/RegexBuddy" rel="noreferrer">RegexBuddy</a>, but still having trouble.</p>

```
```
(?!Andrea).{6}
```
```
Assuming your regexp engine supports negative lookaheads...
...or maybe you'd prefer to use
```
[A-Za-z]{6}
```
in place of
```
.{6}
```
Note that lookaheads and lookbehinds are generally not the right way to "inverse" a regular expression match. Regexps aren't really set up for doing negative matching; they leave that to whatever language you are using them with.