my $s = 'abc_IoExtFscInjS_GetGlobalDatasetActvMethod'; print "1 $1\n" if $s =~ /((?!Eth.+cfg)Eth)/i; print "2 $1\n" if $s =~ /((?!abc_Eth.+cfg)abc_Eth)/i;
Output:
1 eth
You are using the /i modifier which makes the matching case insensitive. The string indeed contains "eth" which is not preceded by "eth.+cfg".
In reply to Re: Regex matches string, i do not know why?!
by choroba
in thread Regex matches string, i do not know why?!
by tobias_hofer
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |