$re = '/^(.*?) : (.+? MB\/s)( \[.*)?$/m';
$str = 'Sequential Read : 135.091 MB/s
Sequential Write : 126.046 MB/s
Random Read 512KB : 44.569 MB/s
Random Write 512KB : 117.965 MB/s
Random Read 4KB (QD=1) : 0.468 MB/s [ 114.4 IOPS]
Random Write 4KB (QD=1) : 8.412 MB/s [ 2053.6 IOPS]
Random Read 4KB (QD=32) : 0.654 MB/s [ 159.6 IOPS]
Random Write 4KB (QD=32) : 10.751 MB/s [ 2624.7 IOPS]
Test : 1000 MB [C: 7.3% (64.9/889.4 GB)] (x5)
Date : 2015/12/09 22:06:02
OS : Windows 8.1 [6.3 Build 9600] (x64)';
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