Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Regex to remove data

by trizen (Hermit)
on Nov 07, 2012 at 07:55 UTC ( #1002644=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1002644]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (6)
As of 2018-02-24 17:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    When it is dark outside I am happiest to see ...














    Results (310 votes). Check out past polls.

    Notices?