$re = '/\(([^,]*),([^,]*),([^,]*),([^,]*),([^,]*)\)/m';
$str = 'foo,(4568,\'самый лучший\',\'солнечная погода\',NULL,3),bar
fizz,(7835,\'sup\',\'789 y\',NULL,9),buzz
abracadabra
to many items,(7835,\'sup\',\'789 y\',NULL,9,1111111111111111),buzz
less than five items,(7835,\'sup\',\'789 y\',NULL),buzz
hello,(56498123,\'atdaadf\',\'kr\',NULL,5),world
';
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