3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $re = '/([\D]+)|([\d]+)/'; $str = 'a74b8c0d3845e7'; preg_match_all($re, $str, $matches); print_r($matches[1]);print_r($matches[2]);
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.13.2, 7.0.0 - 7.1.0
Array ( [0] => a [1] => [2] => b [3] => [4] => c [5] => [6] => d [7] => [8] => e [9] => ) Array ( [0] => [1] => 74 [2] => [3] => 8 [4] => [5] => 0 [6] => [7] => 3845 [8] => [9] => 7 )