Forum Moderators: coopster
(.*) patterns at all; stuff like (([^/]+/)*) will strip the folder structure. (([^.]+\.)+)([^./]+) will split the filename and extension.
preg_match(
'/src\=\"http\:\/\/subsub\.sub\.sub\.adomain\.com\/path\/to\/([\w\.]+\.(\w+))\"/',
$string,
$matches
);
$filename = $matches[1]; # Contents of the first backreference
$filetype = $matches[2]; # Contents of the second backreference
([\w\.]+\.(\w+))