天天看點

替換以特定字元開頭,以特定字元結尾的字元串

String path = "人生若隻如初見,何事秋風悲畫扇.";
String n = path.replaceAll("若.*風", "");
System.out.println("替換後的内容:" +n);