in reply to very quick link regex
Are you trying to match, validate or extract parts?
my $url = 'http://www.page.com/files4/i/90c/1493010807t1.jpg'; my ($domain, $path, $file) = $url =~ m'^(\w+://[\w.]+/)(.*?/)([\w.]+)$ +'; print "$domain\n$path\n$file\n";
Prints:
http://www.page.com/ files4/i/90c/ 1493010807t1.jpg
which may or may not be anything like what you need to do.
|
---|