1. 不可变字符串 (content 是不可变)
NSRegularExpression *regularExpression = [NSRegularExpression regularExpressionWithPattern:
@"<(/{0,})div(.{0,})>" options:0 error:nil];
content = [regularExpression stringByReplacingMatchesInString:content options:0 range:NSMakeRange(0, content.length) withTemplate:@""];
1. 可变字符串 (content 是可变)
[regularExpression replaceMatchesInString:content options:0 range:NSMakeRange(0, content.length) withTemplate:@""];
原文地址:http://blog.csdn.net/majiakun1/article/details/39666163