Finding lines without a word

Finding lines without a word

9
NewbieNewbie
9

    Aug 20, 2005#1

    I am trying to match full lines without a word (say, XYZZY in the example below) but am having trouble. (And I saw how to match lines without specific characters in other threads, but couldn't extend it to full words.)

    Using ^.*XYZZY.*$ I can match lines with the word (lines 1 & 3) but I am having trouble negating that to get the opposite matches of lines 2 & 4.

    1) Fred Tom XYZZY Jack Bob
    2) Jack Bob Frank Fred Tom
    3) Tom Jack Bob XYZZY Frank
    4) Tom Jack Bob Frank Fred

    Any recomendations or assistance?

    (Using UE32 11.00+)

    6,686585
    Grand MasterGrand Master
    6,686585

      Aug 22, 2005#2

      It is not possible to find lines which does not contain a specific word. As a workaround you can replace all lines which contain the word with nothing and as a result you will get all lines, which does not have this word.
      Best regards from an UC/UE/UES for Windows user from Austria

      9
      NewbieNewbie
      9

        Aug 23, 2005#3

        Thanks, Mofi! That will save me further beating of my head against the wall.

        I can explore other options instead: replace word with unique char, or macros. Since at the moment I just want to delete the irrelevant lines, I know I can get these alternates working. I just thought I was missing some obvious regex trick.