use constant TEST => 'def'; my $string = 'abcdefg'; if ($string =~ /(?{TEST})/) { print "The string contains the constant.\n"; }else{ print "The string doesn't contain the constant.\n"; }
Aziz,,,
In reply to Re: Using CODEconstant/CODEs in regexes?
by abstracts
in thread Using constants in regexes?
by Kozz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |