Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: On zero-width negative lookahead assertions

by ikegami (Patriarch)
on Sep 10, 2004 at 14:24 UTC ( #390085=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    >perl -lne "/^root:\s*(?!admin\@somewhere\.here)(.*)/ and print $1" \
         aliases.txt
    someone@somewhere.else
     admin@somewhere.here
    
  2. or download this
    >perl -ne "/^root:\s*(?!admin\@somewhere\.here)\S/ and print;" \
         aliases.txt
    root: someone@somewhere.else
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2022-05-22 02:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (78 votes). Check out past polls.

    Notices?