2
4
public class Test { public static void main(String[] args) { String str = "五笔字型计算机汉字输入技术。\n" + "五笔字型计算机汉字输入技术。\n" + "五笔字型计算机汉字输入技术。"; str = str.replaceAll("(?m:^)", " "); System.out.println(str); } }