Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
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)\/)


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 meditating upon the Monastery: (4)
As of 2015-07-03 00:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (47 votes), past polls