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.
In reply to Re: A better way? Extracting filename from url
by Caillte
in thread A better way? Extracting filename from url
by Gerard
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |