finding lines NOT beginning with a certain character

Find, replace, find in files, replace in files, regular expressions

finding lines NOT beginning with a certain character

Postby jeffr88045 » Fri Jan 27, 2006 6:14 pm

I know that to find lines beginning with the letter A, for instance, I would simply put %A in the search box (and check regular expressions). But how would I find all lines NOT beginning with the letter A? I've tried %[^A] but that doesn't work. My goal is to find all lines in a very large pipe-delimited text file NOT beginning with a handful of certain characters and numbers.

Thanks very much.

Jeff
User avatar
jeffr88045
Newbie
 
Posts: 2
Joined: Fri Jan 27, 2006 12:00 am

Re: finding lines NOT beginning with a certain character

Postby mrainey56 » Sat Jan 28, 2006 1:18 am

This works in Unix regex mode

^[^a]
User avatar
mrainey56
Master
Master
 
Posts: 212
Joined: Tue Jul 27, 2004 11:00 pm
Location: Spartanburg, South Carolina

Re: finding lines NOT beginning with a certain character

Postby Mofi » Sat Jan 28, 2006 1:13 pm

And for UltraEdit style it is %[~A].
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 4055
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna

Re: finding lines NOT beginning with a certain character

Postby jeffr88045 » Mon Jan 30, 2006 5:18 pm

Thank you both very much. - Jeff
User avatar
jeffr88045
Newbie
 
Posts: 2
Joined: Fri Jan 27, 2006 12:00 am


Return to Find/Replace/Regular Expressions