$ perl -e' $line = "xyz"; $var1 = ""; $var2 = "abc"; #check = "Yes"; if ( ( ( $line =~ m/$var1/i ) || ( $line =~ m/$var2/i ) ) and ( $check + =~ m/YES/i ) ) { print "Inside if\n"; } else { print "Outside if\n"; } ' Outside if
Is this what you are seeing? What is the problem?
Sorry, typo on line 5.
In reply to Re: Issue with matching regex
by jwkrahn
in thread Issue with matching regex
by KishKishore
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |