Of course, this won't work for URL's with an implicit filename, like "http://www.yahoo.com" or "http://www.somewhere.com/home/" You'll have to catch those bad boys elsewhere in your code.if ($myvar =~ m/\.([^.]+)$/) { print "Matched $1"; }
Gary Blackburn
Trained Killer
In reply to Re: Re: Re: Regex to match file extension in URL
by Trimbach
in thread Regex to match file extension in URL
by Amoe
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |