62,614
社区成员
发帖
与我相关
我的任务
分享
public static void main(String[] args) {
String str = "<p id=\"lId1\" class=\"lrcItem\">\r\n" +
"<p id=\"lId2\" class=\"lrcItem\">\r\n" +
"<p id=\"lId3\" class=\"lrcItem\">";
str = str.replaceAll("lId\\d", "lId");
System.out.println(str);
}