You might have an easier time at typing your regexp if you used qr// instead of double quotes:$criteria = "(abc|123)\$"; $teststring = "Foo walks up and says: abc"; if ( $teststring =~ /$criteria/ ) { print "Got $1\n"; } else { print "uh no, it did not\n"; } __END__ output ====== Got abc
$criteria = qr/(abc|123)$/; ...
In reply to Re^2: $scaler inside a RegEx
by ikegami
in thread $scaler inside a RegEx
by ManFromNeptune
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |