Here you can find the source of rmvBlankLines(String input)
public static String rmvBlankLines(String input)
//package com.java2s; public class Main { public static String rmvBlankLines(String input) { return input.replaceAll("((\r\n)|\n)[\\s\t ]*(\\1)+", "$1"); }/* w w w .ja va 2s. c o m*/ }