Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove empty lines in eclipse code editor by find/replace (Ctrl+F)

I want to remove all blank lines from my code by find/replace method in eclipse code editor.

I used regular expression \n\s*\n to find all blank lines but got error "Incompatible line delimiter near index 55110" when replacing the blank line with any string.

Why i got this error and how to properly remove the blank lines? What will the working replacement character ?

Is there any eclipse plugin for these kind of job?

like image 751
gtiwari333 Avatar asked Jul 08 '11 04:07

gtiwari333


1 Answers

You can try replacing this:

^\s*\r?\n

with the empty string.

like image 102
wjans Avatar answered Oct 13 '22 01:10

wjans