【发布时间】:2011-03-09 19:44:29
【问题描述】:
我正在尝试替换文档的锚标记封闭 URL 中的所有非锚标记封闭 URL。所以给定字符串:
I have two urls for google: <a href="http://www.google.com/">google</a> and http://www.google.com/
我想用这个替换它:
I have two urls for google: <a href="http://www.google.com/">google</a> and <a href="http://www.google.com/">http://www.google.com/</a>
有没有人知道在 Java 中执行此操作的干净方法?
【问题讨论】: