$re = '/<[^>]*>\s*$/m';
$str = '<ABZ>-<BOS>-<Mon Dec 28 11:20:00 UTC 2015>-<Mon Dec 28 18:05:00 UTC 2015>-<EI>-<3241>-<EI>-<139>-<USBR>-<ROUND>-<GBP>
<ABZ>-<BOS>-<Mon Jan 04 11:20:00 UTC 2016>-<Mon Jan 04 18:05:00 UTC 2016>-<EI>-<3241>-<EI>-<139>-<NONE>-<ONEWAY>-<GBP>
<ABZ>-<BOS>-<Mon Jan 04 11:20:00 UTC 2016>-<Mon Jan 04 18:05:00 UTC 2016>-<EI>-<3241>-<EI>-<139>-<NONE>-<ROUND>-<USD>
<ABZ>-<BOS>-<Mon Jan 04 11:20:00 UTC 2016>-<Mon Jan 04 18:05:00 UTC 2016>-<EI>-<3241>-<EI>-<139>-<NSNS>-<ROUND>-<GBP>
<ABZ>-<BOS>-<Mon Jan 04 11:20:00 UTC 2016>-<Mon Jan 04 18:05:00 UTC 2016>-<EI>-<3241>-<EI>-<139>-<USBC>-<ONEWAY>-<GBP>
<ABZ>-<BOS>-<Mon Jan 04 11:20:00 UTC 2016>-<Mon Jan 04 18:05:00 UTC 2016>-<EI>-<3241>-<EI>-<139>-<USBC>-<ROUND>-<GBP>
<ABZ>-<BOS>-<Mon Jan 04 11:20:00 UTC 2016>-<Mon Jan 04 18:05:00 UTC 2016>-<EI>-<3241>-<EI>-<139>-<USBC>-<ROUND>-<USD>';
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