$re = '/\d{4}-\d{2}-\d{2}T\d\d:\d\d:\d\d+\+\d\d:\d\d\s(?<device>[^ ]+)\s<\d\d>\s\s%(?<alarm>\w+-\w+)[^ ]*\s+(\(\d+\)\s+)*(?<message>.*)/m';
$str = '0x4a6140(/sw/unicorn/bin/http_ao64+0xa6140)
2020-04-04T15:08:05+00:00 usdaldc <44> %WAAS-HTTPAO-4-131001: (143581) worker pool isn\'t healthy
2020-04-04T15:08:05+00:00 usdaldc <43> %WAAS-HTTPAO-3-131003: (143528) AOSHELL worker thread
2020-04-07T11:33:08+00:00 bempp <43> %WAAS-NODEMGR-3-330105: Keepalive problem: Could not register nodemgr. [7]
2020-04-07T11:11:29+00:00 gbfaw <43> %WAAS-NODEMGR-3-330105: Keepalive problem: Could not register nodemgr. [7]';
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