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:@""];
时间: 2024-10-10 22:02:28