3v4l.org

run code in 300+ PHP versions simultaneously
<?php $re = '/^(\d+)[.\s-]+(.+)/m'; $str = '01.text 2 - something 3 more'; preg_match_all($re, $str, $matches, PREG_SET_ORDER, 0); var_dump($matches);

preferences:
118.92 ms | 405 KiB | 5 Q