NSError* error =NULL;
? ? NSRegularExpression * regex = [NSRegularExpression regularExpressionWithPattern:@"(\\d)(?=((\\d{3})+$))" options:NSRegularExpressionAllowCommentsAndWhitespace error:&error];
? ? NSMutableString * orgStr =[[NSMutableString alloc]initWithString:@"1234567"];
? ? NSString * needStr = [regex stringByReplacingMatchesInString:orgStr options:NSMatchingReportProgress range:NSMakeRange(0, orgStr.length) withTemplate:@"$1,"];
? ? NSSLog(@"輸出看下 needStr:%@",needStr);