in reply to RegEx Array
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
|
|---|