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

Viewed 11948

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?

7 Answers

This worked for me for years:

Replace: [\t ]+$

With blank

Related