Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Getting only the link in a line

by poolpi (Hermit)
on Nov 04, 2010 at 10:20 UTC ( #869427=note: print w/replies, xml ) Need Help??


in reply to Getting only the link in a line

See Regexp::Common::URI::http

#!/usr/bin/perl use strict; use warnings; use Regexp::Common qw /URI/; while(<DATA>){ chomp; /$RE{URI}{HTTP}{-keep}/ and print "Contains an HTTP URI.\nHost=$3\n"; } __DATA__ http://192.168.1.10/index.html http://www.delicious.com/search?p=perl&chk=&context=main|&fr=del_icio_ +us&lc=

Output:
Contains an HTTP URI.
Host=192.168.1.10
Contains an HTTP URI.
Host=www.delicious.com


hth,
PooLpi

'Ebry haffa hoe hab im tik a bush'. Jamaican proverb

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://869427]
help
Chatterbox?
[LanX]: D : Oberbefehlshaber
[GotToBTru]: yeah, thats the story I remember. some card the President is supposed to carry around at all times
[GotToBTru]: I suppose the actual details about what is necessary to actually do something is kept fuzzy deliberately
[LanX]: the interview was with the guy who designed the process
[LanX]: in the 70s
[GotToBTru]: so the font on the card is probably NOT Comic Sans
[GotToBTru]: that's a relief
[LanX]: Bruce_G._Blair
[choroba]: as in embossed card?

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (9)
As of 2017-01-20 12:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (174 votes). Check out past polls.