Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

regex: negative lookahead

by svenXY (Deacon)
on Dec 05, 2011 at 15:47 UTC ( [id://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
Domain Nodelet?
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?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2024-04-24 20:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found