3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $subject = " XYZ99 Some text XYZ99. XYZ13 Some text XYZ33 and some text XYZ13. XYZ45 "; var_dump( preg_match_all('/^XYZ\d{2}$/m', $subject, $matches), $matches );
based on NJqRe
Output for 4.3.0 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.0
int(3) array(1) { [0]=> array(3) { [0]=> string(5) "XYZ99" [1]=> string(5) "XYZ13" [2]=> string(5) "XYZ45" } }
Output for hhvm-3.10.0

Process exited with code 153.