3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php if (preg_match( '/\b((IA|IO|A|O|D)[0-9]{6})(-*(R|revised)[\w]*)*\b/i', trim("Outbound Quote: O529012-R12421 Houston to blah blah"), $matches ) ) { var_dump($matches); }
based on doQDQ
Output for 4.3.0 - 7.2.0
array(5) { [0]=> string(14) "O529012-R12421" [1]=> string(7) "O529012" [2]=> string(1) "O" [3]=> string(7) "-R12421" [4]=> string(1) "R" }