使用包含URL的新字符串返回字符串?

时间:2015-03-27 05:47:55

标签: java string

我的字符串如下:

String tweet = "#Insurgent is No. 1 in 72 of 76 markets where it opened this weekend #BoxOffice http://t.co/Y1Cdjl5JQ8 http://t.co/442WKZVcOq";

我希望它将字符串转换为以下内容:

"#Insurgent is No. 1 in 72 of 76 markets where it opened this weekend #BoxOffice <a>http://t.co/Y1Cdjl5JQ8</a> <a>http://t.co/442WKZVcOq</a>";

所以我想检查网址的字符串并用锚标记包装。

0 个答案:

没有答案