Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^3: Regex negative word

by GhodMode (Pilgrim)
on Mar 30, 2006 at 15:42 UTC ( [id://540191]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Regex negative word
in thread Regex negative word

You are absolutely right! But, rereading the question, the whitespace and the dog aren't necessary, either. zer just asked for a regex that matches a string which does not begin with cat. So, I think /^(?!cat)/ should do it. That would match any line with a beginning which is not followed by a cat, right?
--
-- GhodMode
Blessed is he who has found his work; let him ask no other blessedness.
-- Thomas Carlyle

Replies are listed 'Best First'.
Re^4: Regex negative word
by GhodMode (Pilgrim) on Mar 30, 2006 at 15:48 UTC
    Incidentally, due to my only skimming the replies, I've wasted everyone's time. My apologies to GrandFather who gave the correct answer first.
    --
    -- GhodMode
    
    Blessed is he who has found his work; let him ask no other blessedness.
    -- Thomas Carlyle

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2024-04-25 12:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found