Category Archives: Netbeans

How to delete blank lines from code in Netbeans

Formatting in Netbeans will not delete all the blank lines and sometimes we want this. For example, when the charset is messed up and the blank spaces are doubled because CR and LF – Unix – Windows compatibility.

Solution: Ctrl-F (find) in Netbeans as Regular Expression:

\n\s*(\n)

and Replace All by

$1

A special thanks to http://seo.911web.org/netbeans-how-to-delete-blank-lines

Advertisements
%d bloggers like this: