Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Re: how to use "NOT" in regex

by mellon85 (Monk)
on Mar 23, 2011 at 23:34 UTC ( #895151=note: print w/replies, xml ) Need Help??

in reply to how to use "NOT" in regex

can't you match the strings that start with those two words and then negate the condition? makes more sense to me as a regexp

if (!/^($word1|$word2)/) { # code }

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://895151]
[stevieb]: I stated I use IDEA for Perl work, and at work, licensed version of PyCharm
[beech]: is that a good thing?
[stevieb]: absolutely. Free professional IDEs and related software for all the langs I write in, and I wanted CLion because it's a C IDE that can communicate directly with an Arduino

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2017-02-20 20:19 GMT
Find Nodes?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?

    Results (302 votes). Check out past polls.