How can I match a string which contains "weird" but does
not have "odd" somewhere in the string before it? I have
tried negative lookbehind as shown below with no success.
The example only works if "odd" immediately precedes "weird".
my $str = "odd an very weird receiver";
if ($str =~ /(?<!odd)weird/)
{
print "hit";
}