ios去掉字符串中的html标签的方法
来源:互联网 发布:vb源码下载 编辑:程序博客网 时间:2024/04/30 14:14
- -(NSString *)filterHTML:(NSString *)html
- {
- NSScanner * scanner = [NSScanner scannerWithString:html];
- NSString * text = nil;
- while([scanner isAtEnd]==NO)
- {
- //找到标签的起始位置
- [scanner scanUpToString:@"<" intoString:nil];
- //找到标签的结束位置
- [scanner scanUpToString:@">" intoString:&text];
- //替换字符
- html = [html stringByReplacingOccurrencesOfString:[NSString stringWithFormat:@"%@>",text] withString:@""];
- }
- // NSString * regEx = @"<([^>]*)>";
- // html = [html stringByReplacingOccurrencesOfString:regEx withString:@""];
- return html;
- }
0 0
- ios去掉字符串中的html标签的方法
- ios去掉字符串中的html标签的方法
- ios去掉字符串中的html标签的方法
- IOS去掉字符串中的html标签的方法
- Swift去掉字符串中的html标签的方法
- 去掉字符串中的HTML标签-记录
- android 去掉字符串中的html标签
- iOS 去掉HTML标签
- iOS 去掉html标签
- JAVA去掉字符串里的html标签。
- iOS字符串NSString 过滤HTML标签的两种方法
- java去除字符串中的html标签的方法
- 去掉HTML的标签
- 去掉NSString中的HTML标签
- 去掉NSString中的HTML标签
- 去掉NSString中的HTML标签
- 去掉<textarea>中的html标签
- ASP去掉字符串中HTML标签的函数
- 雷军不是个好程序员
- 【Unity】NGUI实现技能冷却脚本
- LeetCode125——Valid Palindrome
- Hadoop报错信息:Job not successful. Error: # of failed Map Tasks exceeded allowed limit. FailedCount: 4.
- The Open Source Interconnection (OSI) Model
- ios去掉字符串中的html标签的方法
- 【设计模式】-模板方法模式(Template)
- Unity 通过脚本修改源资源
- postgres函数
- winows运行时应用生命周期
- c++_primer_exercise_1435_1436
- nodejs使用express,express版本3.5.3使用中间件app.user(express.multipart())异常问题
- myeclipse8.5发布maven web项目
- hibernate注解方式