Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
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?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2014-07-10 05:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (199 votes), past polls