1 2 3 4 5 6
<?php $str = "example This 1 is 01 2 a 2 test 4 45 aaa"; echo preg_replace("/^example.*/", "hello world", $str); ?>
1
hello world