3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tests = [ 'This string s_0a1f2d4e3c10b is foo.', 's_1a23b456c789', 'b_9d9d9d9d9d', 's_1e2f3a4b' ]; foreach ($tests as $test) { var_export( preg_match_all( '~(?:s_|\G(?!^)[a-z]+)\K\d+~', $test, $matches ) ? $matches[0] : [] ); echo "\n---\n"; }

preferences:
24.07 ms | 405 KiB | 5 Q