find lines without an specific letter

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
jan-01
Posts: 19
Joined: Fri Apr 27, 2007 9:40 am

find lines without an specific letter

Post 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
ben_josephs
Posts: 2464
Joined: Sun Mar 02, 2003 9:22 pm

Post 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.
jan-01
Posts: 19
Joined: Fri Apr 27, 2007 9:40 am

Post by jan-01 »

Thanks!
Jan
Post Reply