Cosmin Cosmin
Cosmin Cosmin

Reputation: 1556

How can you search for files that don't contain a certain string

How can you search with NotePad++ using Find in Files with Regex for files that don't contain MYSTRING, but contain some markers, see example:

File1

<xxxx>...
  <YY>...
    "MYSTRING"
  </YY>...
</xxxx>...

File2

<xxxx>...
  <YY>...
    ....
  </YY>...
</xxxx>...

I want only File2 to match.

... means random chars that I don't care about (including new line)

I tried lots of things, including all sorts of lookarounds, but no luck.

Something like this:

MODIFICATION_TIME.*MYSTRING.*</Entity

but the opposite, MODIFICATION_TIME that is missing MYSTRING after it.

. needs to match newlines also

Upvotes: 2

Views: 2232

Answers (1)

Cosmin Cosmin
Cosmin Cosmin

Reputation: 1556

I think I found it:

MARKER(?!.*MYSTRING)

Upvotes: 2

Related Questions