Finding empty lines

Discussion Forums discussion Finding empty lines

This topic contains 2 replies, has 3 voices, and was last updated by  NickDMax 11 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
Author Posts
Author Posts
October 5, 2013 at 12:16 am #20020

MooSH
Participant

hi all

Basically ill spare the long and boring details, but i need a way of quickly finding all empty lines in a document. I can do it manually but the problem is i have 363,397 lines of code.

anyone have any advice on this??

thankyou in advance

October 16, 2013 at 11:27 am #20026

Tiax
Participant

Search for (ctrl+f), tick “regular expression”

Find: ^\s*$

i.e.:

“^” Start of line
“\s*” zero or more whitespace characters (tabs, spaces, …)
“$” End of line

October 21, 2013 at 2:41 pm #20029

NickDMax
Member

Often I have to find and remove blank lines.

This can be done by with the following search

“^\s*[\r\n]+”

this search begins at the beginning of the line “^”, grabs up any white space “\s*” (including end of line markers), and then ensure the match ends with end of line marks “[\r\n]+”

You leave the replace field blank.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.