Code
/**
* 去掉所有的html标签
*/
- (NSString *)getTextWithHtmlString:(NSString *)string{
NSRegularExpression *regularExpretion=[NSRegularExpression regularExpressionWithPattern:@"<[^>]*>|\n| "
options:0
error:nil];
string=[regularExpretion stringByReplacingMatchesInString:string options:NSMatchingReportProgress range:NSMakeRange(0, string.length) withTemplate:@""];
return string;
}
本站文章除注明转载/出处外,均为本站原创或翻译,转载前请务必署名,转载请标明出处;