Using Regexp::Assemble
use strict; use warnings; use Regexp::Assemble; my $re=Regexp::Assemble->new(); $re->add('ntv\.com/very-own/'); $re->add('ntv\.com/business/'); $re->add('ntv\.com.wid-prl.com/very-own/'); $re->add('ltv\.com/very-own/'); print $re->re."\n";
produces
(?^:(?:ntv\.com(?:\/(?:business|very-own)|.wid-prl.com\/very-own)|ltv\.com\/very-own)\/)In reply to Re: Single regex
by clueless newbie
in thread Single regex
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |