if (preg_match('#attachment\.php\?attachmentid=(\d+)#si', $img_url, $matches) AND preg_match('#class=(\'|"|)([a-z0-9_\-\s]+)?\s*previewthumb\s*([a-z0-9_\-\s]+)?(\\1)#si', $fullurl))