我有以下方法:
public void parse(){
String x = "<p><a href=\"http://WWW.xxxx.COM\" class=\"url\" target=\"_blank\">Website for xxxx</a></p>";
int start = 0;
int end = 0;
for (int i = 0; i < x.length(); i++){
start++;
if (x.charAt(i) == '\"'){
start = i;
}
}
System.out.println(x.substring(start));
}
如何从字符串中删除标签,以便获得最终结果:
www.xxxx.com