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