81,094
社区成员
发帖
与我相关
我的任务
分享
public static void main(String[] args) {
String str = "<href=\"/foo>Hi</a>";
str = str.replaceAll("href=\"/", "href=\"http://www.domain.com/");
System.out.println(str); // 输出: <href="http://www.domain.com/foo>Hi</a>
}