Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

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=""; $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.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (2)
As of 2016-08-25 03:34 GMT
Find Nodes?
    Voting Booth?
    The best thing I ever won in a lottery was:

    Results (353 votes). Check out past polls.