如何从字符串中删除HTML标记 - 目标C.

时间:2018-01-12 04:37:47

标签: html objective-c nsstring nsmutablestring

如何从字符串中删除HTML标记,所以字符串如下:

myString = @"<a href=\"https://timesofindia.indiatimes.com/sports/off-the-field/hamiltons-social-silence-has-the-f1-fans-talking/articleshow/62462341.cms\"><img border=\"0\" hspace=\"10\" align=\"left\" style=\"margin-top:3px;margin-right:5px;\" src=\"https://timesofindia.indiatimes.com/photo/62462341.cms\" /></a>Lewis Hamilton's social media posts have long been a talking point in Formula One but the absence of any from the four times world champion so far this year is also attracting attention.";

修改后我的字符串应如下:

newString = @"Lewis Hamilton's social media posts have long been a talking point in Formula One but the absence of any from the four times world champion so far this year is also attracting attention.";

我应该使用什么来从myString获取newString?

0 个答案:

没有答案