in reply to
regex a url
print $1 if /\/([^/?]+)(:?\?.*)?$/;
But it is better to use
joe++
's code and then
print $1 if $path =~ /\/([^/]+)$/
Makeshifts last the longest.
Comment on
Re: regex a url
Select
or
Download
Code
In Section
Seekers of Perl Wisdom