in reply to Regex matches string, i do not know why?!

#!perl -wl use strict; my $__item= 'abc_IoExtFscInjS_GetGlobalDatasetActvMethod'; warn $__item; if ( ($__item =~ m/(?!Eth.+cfg)Eth/i) || ($__item =~ m/(?!abc_Eth.+cfg +)abc_Eth/i) ) { print $`; print $&; print $'; print "match"; } else { print "No match"; }; __END__ abc_IoExtFscInjS_GetGlobalDatasetActvMethod at tmp.pl line 6. abc_IoExtFscInjS_GetGlobalDatasetActvM eth od match

This had me stumped first, but when Perl claims it finds a match, it can also tell you, where :)