Hi
& is a special character one. That's why it doesn't match. Use the following:
if (($string=~m/abc/i && $string=~m/xyz/i)) { print "\nMatched"; }
Or Simply use
if ($string=~m#(abc).*?(xyz)#i) { print "\nfound"; }
In reply to Re: Regular Expression
by gopalr
in thread Regular Expression
by FarTech
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |