NSMutalbeStirng 正则替换

 NSMutableString *temp = [@"1234567" mutableCopy];

    [temp replaceOccurrencesOfString:@"[1236]" withString:@"" options:NSRegularExpressionSearch range:NSMakeRange(0, temp.length)];

    NSLog(@"%@", temp);

猜你喜欢

转载自lizhuang.iteye.com/blog/2097851