http://www.perlmonks.org?node_id=1002644


in reply to Regex to remove data

Keeps the lines that are empty or that contain only whitespace characters:

perl -ne 'print if not /[A-Z]/ && /^[A-Z\s]+$/' file.txt