62,612
社区成员
发帖
与我相关
我的任务
分享
System.out.println(" <B> 你好 </B> ".replaceAll("<(.+?)>(.+?)</\\1>","$2"));
public class Test {
public static void main(String[] args) {
System.out.println("Hello World");
String s = "<B> 你好 </B>";
String ss = s.replaceAll("<\\w>|</\\w>", "");
System.out.println(ss);
}
}