preg_replace("/>>[0-9]+/","【ここがわからない】",$str);

これの0-9の文字って取得できるの?