Page 1 of 1

find lines without an specific letter

Posted: Mon Sep 22, 2008 7:07 am
by jan-01
Hi, I tried to find an solution for my question in the forum...

I have a lot of lines with an 'N' and without 'N'
I want to select the lines without an 'N'

\SIG M t 219
\SIG M t 219
\SIG M t 219 N
\SIG M t 219 N
\SIG M t 21
\SIG M t 219 N
\SIG M t 219
\SIG M t 210

Is there an reg expression for this?

thanks in advance
Jan

Posted: Mon Sep 22, 2008 8:47 am
by ben_josephs
To find (non-empty) lines that do not contain an N anywhere:
^[^N]+$

To find (non-empty) lines that do not end with an N:
^.*[^N]$

If it's only upper-case Ns that you want to find the absence of, select Match case.

Posted: Thu Sep 25, 2008 4:31 pm
by jan-01
Thanks!
Jan