日期:2014-05-20 浏览次数:20568 次
String head="<head>head</head><head>第四代</head>"; System.out.println(head.replaceAll("(</?)head(>)", "$1h1$2")); System.out.println(head.replaceAll("<head>", "<h1>").replaceAll("</head>", "</h1>"));