标签:option actor char length tco match 字符串 nil ssi
//根据正则表达式过滤非法的字符串
+ (NSString *)filterCharactor:(NSString *)str withRegexString:(NSString *)regexStr
{
NSError * error = nil;
NSRegularExpression * expression = [NSRegularExpression regularExpressionWithPattern:regexStr options:NSRegularExpressionCaseInsensitive error:&error];
NSString * last=[expression stringByReplacingMatchesInString:str options:NSMatchingReportCompletion range:NSMakeRange(0, str.length) withTemplate:@""];
return last;
}
标签:option actor char length tco match 字符串 nil ssi
原文地址:http://www.cnblogs.com/VzhanggengD/p/6483394.html