A typical way to do this is using alternation in RE. You can dynamically generate the RE...
my @REs = qw( this that \w\d\w ); my $re = join '|', @REs; # join with | for alternation $re = qr/($re)/; # compile for efficiency print "Matched $1\n" if $str =~ m/$re/;
cheers
tachyon
In reply to Re: RegEx Array
by tachyon
in thread RegEx Array
by turbo3k
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |