Remove all lines with less than so many characters

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

Remove all lines with less than so many characters

Postby bettyt456 » Mon Jul 23, 2007 7:04 pm

I've been searching this question like crazy, and I've read all the FAQs, but nothing I find tells me how to do what seems like a simple Reg Expression.

SO HERE IS MY SIMPLE QUESTION:

I want to remove all lines (strings) that contain less than 41 characters.

Pretty simple I bet, but no posts that I've found explain this.
User avatar
bettyt456
Newbie
 
Posts: 5
Joined: Wed Jan 10, 2007 12:00 am

Re: Remove all lines with less than so many characters

Postby jorrasdk » Mon Jul 23, 2007 8:08 pm

You don't tell us which UE version you use, so let's assume you have UE 12.00 or later.

Switch to Perl regex engine as described in the announcement.

Then search (checkmark "Regular expressions") for:

^.{1,40}\r?\n

and replace nothing.
User avatar
jorrasdk
Master
Master
 
Posts: 275
Joined: Mon Mar 19, 2007 11:00 pm
Location: Denmark

Re: Remove all lines with less than so many characters

Postby bettyt456 » Mon Jul 23, 2007 10:25 pm

Sorry...using UltraEdit Version 12.20
User avatar
bettyt456
Newbie
 
Posts: 5
Joined: Wed Jan 10, 2007 12:00 am


Return to Find/Replace/Regular Expressions