次のような文字列があります。
123 qwerty 6 foo bar 55 bar
私はそれをこのようにする必要があります
123 qwerty
6 foo bar
55 bar
作り方は?
UPD: 作ってみました
$subject = "123 qwerty 6 foo 55 bar";
$pattern = '/[^0-9]/';
preg_match($pattern, substr($subject,3), $matches, PREG_OFFSET_CAPTURE);
echo "<pre>";
print_r($matches);
しかし、それは私にとってはうまくいきません。