or even simpler (but slower)$s = "match"; $re = qr/$s/; print "yup" if $something =~ $re;
$s = "match"; print "yup" if $something =~ /$s/;
In reply to Re: Regexes that use a string as basis for matching
by holli
in thread Regexes that use a string as basis for matching
by gatito
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |