Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
文の配列があります。単語がタブで分割されることもあれば、1つになることもあれば、1つ以上になることもあります。
私が欲しいのは単純だと思います。すべての単語を複数のタブで割った単語間のタブ数を1に変更したい。
Example, I want to change this: \t\t This \t\t\t\t\t is \t\t a\t test. into this: \t This \t is \t a \t test.
前もって感謝します!
$string = preg_replace("/\t+/", "\t", $string);