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

Re: A better way? Extracting filename from url

by Caillte (Friar)
on Jan 14, 2002 at 18:03 UTC ( #138563=note: print w/ replies, xml ) Need Help??


in reply to A better way? Extracting filename from url

One way would be :

$subject="http://www.spied.co.nz/thinmailer.cgi"; $subject=~ s/.*\/([^\/]*)$/$1/; print $subject

What this does is return the last block of code that does not contain a backslash, from the last backslash to to the end of line.

This page is intentionally left justified.


Comment on Re: A better way? Extracting filename from url
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (16)
As of 2015-07-30 15:58 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 (273 votes), past polls