$re = '/(\w*\(Hex\): w*)(.*?)(?= |$)/msi';
$str = ' Vserver Name: vs1
LUN Path: /vol/vol1/lun1
Volume Name: vol1
Qtree Name: ""
LUN Name: lun1
LUN Size: 10MB
OS Type: linux
Space Reservation: disabled
Serial Number: wCVt1]IlvQWv
Serial Number (Hex): 77435674315d496c76515776
Comment: new comment
Space Reservations Honored: false
Space Allocation: disabled
State: offline
LUN UUID: 76d2eba4-dd3f-494c-ad63-1995c1574753
Mapped: mapped
Block Size: 512
Device Legacy ID: -
Device Binary ID: -
Device Text ID: -
Read Only: false
Fenced Due to Restore: false
Used Size: 5MB
Maximum Resize Size: 64.00GB
Creation Time: 9/14/2016 13:55:09
Class: regular
Node Hosting the LUN: node1
QoS Policy Group: -
Caching Policy Name: -
Clone: false
Clone Autodelete Enabled: false
Inconsistent Import: false
Application: -';
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