Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Single regex

by clueless newbie (Hermit)
on Jan 10, 2013 at 18:03 UTC ( #1012712=note: print w/ replies, xml ) Need Help??


in reply to Single regex

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)\/)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1012712]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (None)
    As of 2016-07-30 07:52 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      What is your favorite alternate name for a (specific) keyboard key?


















      Results (265 votes). Check out past polls.