$re = '/^(.*)_((?:x\d{1,4}|\d{1,4}x)(?:\d{1,4})?(?=\+|\.).*)\.(.+)/m';
$str = '/banner/tenis-15088083003831_x1000+crop_center+q_80+f_999+jpg.png
/banner/tenis-15088083003831_2200x9220+crop_center+q_80+F_999+jpg.png
/banner/tenis-1508_8083003831_200x+crop_center+q_80+f_999+jpg.png
/banner/tenis-15088_x21230_83003831_200x.png
/banner/tenis-15088083003831_200x100.png
/banner/tenis-15088083003831_x1000.png
http://cdn.dooca.com.br/melbenett.com.br/banner/tenis-1508808_3003831.png
http://cdn.dooca.com.br/melbenett.com.br/banner/tenis-1508808_123123x12312331.png';
preg_match_all($re, $str, $matches, PREG_SET_ORDER, 0);
// Print the entire match result
var_dump($matches);
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for PHP, please visit: http://php.net/manual/en/ref.pcre.php