Only the 3rd regular expression shows as true. I don't understand why the '4' is not matching the (?=4) pattern or (?=\d) pattern in the first two tests. Regards, Johnmy $string = '54W'; if ($string =~ /(?=4)W/x) { warn "1 true\n"; } if ($string =~ /(?=\d)W/x) { warn "2 true\n"; } if ($string =~ /\dW/x) { warn "3 true\n"; }
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |