my @array = qw( ciccio paperino palla gigio pluto ); my $TestReStr = join("|", map { "(${_})" } @array); my $TestRe = qr/$TestReStr/; my $test = 'pluto'; print "It matched!\n" if $test =~ $TestRe ;
In reply to Re^3: Regex and array
by vtheron
in thread Regex and array
by Deus Ex
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |