Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: match the urls

by sen (Hermit)
on Jan 11, 2013 at 14:35 UTC ( #1012897=note: print w/ replies, xml ) Need Help??


in reply to match the urls

#!/usr/bin/perl use strict; use warnings; my @array = ('https://www.abc.com/ap/ap/top-news/76/nTk3M/','https://w +ww.abc.com/videos/news/eye-catching/vmxJr','https://www.abc.com/ap/to +p/45/state-politic al-news/fgdfgd', 'https://www.abc.com/ap/ap/top-news/', 'https://www.a +bc.com/'); my @b = grep {$_ =~ /\w+\:\/\/\w+\.\w+\.\w+\/(\w+\-?\w+?\/){3,}./ } @a +rray; print "@b";


Comment on Re: match the urls
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2014-09-15 02:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (145 votes), past polls