Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: modify a URL

by mjscott2702 (Pilgrim)
on Nov 05, 2010 at 09:18 UTC ( #869640=note: print w/ replies, xml ) Need Help??


in reply to modify a URL

If you want to do it with just a regex, could try something like:  perl -e '$url = "http://www.abc.com/def/ghi.html"; $url =~ s/(\w)\/.*$/\1/; print $url;'


Comment on Re: modify a URL
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (7)
As of 2015-07-05 20:12 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 (67 votes), past polls