Help for this page
if ( $url =~ m!/([^/]+\.(?:jpe?g|gif|png|tiff?)\b)!i ) { print "Found $1\n"; }
m! # Use an alternate delimiter. / # Match a '/' character to anchor off of. ... ) # End the capture. !ix # Case insensitive /i (Ignore the x, it's only # necessary in this expanded example.