use re "eval"; my @pats = ( qr/one/, qr/two/, qr/three/ ); my $joined = "(??{" . join("})|(??{", map "\$pats[$_]", 0..$#pats) . " +})"; my $any = qr/$joined/;
In reply to Re: Programmatic regex disjunction
by ysth
in thread Programmatic regex disjunction
by gaal
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |