This filter removes blank lines using the DECTPU keywords LINE_BEGIN and LINE_END. global_replace( LINE_BEGIN + LINE_END, ''); The LINE_END keyword absorbs the new line. The above filter only replaces lines containing no characters. The following filter also replaces lines containing only spaces and tab characters: global_replace( LINE_BEGIN + (white_space|null) + LINE_END, '');