2008-01-14 空白を1つにまとめる正規表現 Java 移転しました。 String str = "a bbcc" str = str .replaceAll(" *", " "); ↑半角スペース二つ System.out.println(str); → a bbcc