Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Regex to remove data

by trizen (Friar)
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


Comment on Re: Regex to remove data
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1002644]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (9)
As of 2014-12-25 11:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (160 votes), past polls