Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

regex: negative lookahead

by svenXY (Deacon)
on Dec 05, 2011 at 15:47 UTC ( #941881=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    use strict;
    ...
    print "has_matched $has\n" if $has =~ /^($start(\w+(,\s)?)+)(?!$end)$/
    +;
    print "needs_matched $needs\n" if $needs =~ /^(log4j.rootLogger=INFO, 
    +FILE)(?!, SYSLOG)$/;
    print "has_matched $has\n" if $has =~ /^(log4j.rootLogger=INFO, FILE)(
    +?!, SYSLOG)$/;
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://941881]
Approved by kennethk
help
Chatterbox?
[Corion]: The code is 00000000, as always, no?
[GotToBTru]: I remember hearing about somebody misplacing a list of code phrases or something
[marto]: 12345
[GotToBTru]: the "nuclear codes" are in the case cuffed to the wrist of some guy
[LanX]: not always
[LanX]: it's up to the Supreme commander
[GotToBTru]: we don't have one of those ;)
[LanX]: commander in chief whatever

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (7)
As of 2017-01-20 12:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (174 votes). Check out past polls.