This
if ($str =~ /nbk[A-z0-9]{4}/ or /nbd[A-z0-9]{4}/ or /root/){
is the same as
if ($str =~ /nbk[A-z0-9]{4}/ or $_ =~ /nbd[A-z0-9]{4}/ or $_ =~ / +root/){
which not what I think you're after. Perhaps you meant
if ($str =~ /nbk[A-z0-9]{4}/ or $str =~ /nbd[A-z0-9]{4}/ or $str +=~ /root/){
In reply to Re: Not matching REGEX
by FunkyMonk
in thread Not matching REGEX
by cutter
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |