in reply to Regex negative word
With a negative look ahead assertion:
$_ = "cat dog"; print 'match' if /^(?!cat)/; print 'no match' unless /^(?!cat)/; [download]
Prints:
no match [download]