Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
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


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 exploiting the Monastery: (4)
As of 2015-07-30 01:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (269 votes), past polls