$re = '/^(?<date_time>[^;]*);(?<token>[^;]*);(?<field3>[^;]*);(?<field4>[^;]*);(?<field5>[^;]*);(?<url>[^;]*);(?<respTime>[^;]*);(?<field8>[\S]*)/m';
$str = '2016-11-29 17:38:51,966;;;;RTI;/messages;2;log-rest
2016-11-29 17:38:51,911;;messages;service;;;0;log-rest
2016-11-29 17:38:51,880;13cpvmx3bXE/4i0fqgB20H2Zke7vJ41q;sendmyorder;portlet;RT;overView;40;customers
2016-11-29 17:38:51,793;zsFS6vnZoASelCFNv8wH7iiPMV1SmDR2IimbDntp2+MOs2azPOSsFSbXEjmMX6sPNJV63vq6UE3GhQPAGtxd7A==;;;RTI;/wsdl/contact/chain;2;www-api';
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