Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re^3: Regex negative wordby GhodMode (Pilgrim) |
on Mar 30, 2006 at 15:42 UTC ( [id://540191]=note: print w/replies, xml ) | Need Help?? |
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?
-- -- GhodModeBlessed is he who has found his work; let him ask no other blessedness. -- Thomas Carlyle
In Section
Seekers of Perl Wisdom
|
|