s/\n\s*/\n/g; # every string of \n plus 0-or-more whitespace --> single \n