$re = '/seqno: (\d+).+?src: (\d{1,3}.\d{1,3}.\d{1,3}.\d{1,3}).+?dst: (\d{1,3}.\d{1,3}.\d{1,3}.\d{1,3}).+?srcuser: (.+)?<br\/>/';
$str = 'domain: 1<br/>receive_time: 2017/10/25 13:47:19<br/>serial: 00790100000<br/>seqno: 7198725<br/>actionflags: 0x0<br/>type: THREAT<br/>subtype: spyware<br/>config_ver: 1<br/>time_generated: 2017/10/25 13:47:19<br/>src: 1.1.1.1<br/>dst: 2.2.2.2<br/>natsrc: 1.1.1.1<br/>natdst: 2.2.2.2<br/>rule: to INTERNET<br/>srcuser: me<br/>blabla';
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