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


Comment on Re: Single regex
Download Code

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: (10)
As of 2014-09-23 17:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (234 votes), past polls