<code>$chain = "Xeon E3 1230v3 Quad Core Server (21/09/2018 - 20/10/2018) Server Addons - OS: CentOs Server Addons - Database: Mysql Server Addons - Controlpanel: Plesk";
$regex = '/^([a-zA-Z0-9\-\s\(\/]*\))/';
$data['regex'] = $regex;
$data['chain'] = $chain;
if(preg_match( $regex, $chain, $matches)){
$remaining = str_replace($matches[0], "", $chain);
$parts = explode(':', $remaining);
$data['match'] = $matches[0];
for($i = 0; $i < count($parts); $i++){
$infos = explode('-', $parts[$i]);
$data['properties']["{$infos[0]}"] = $infos[1];
}
}
echo "<pre>";
print_r($data);
echo "
";