Find and remove empty or blank lines in Eclipse

Versions used: 

If you need to remove empty or blank lines in Eclipse, follow the instructions below:

  • Open the find/replace window (Ctrl + F).
  • Check the Regular Expressions checkbox.
  • In the Find field, enter:
    ^\s*\n