for (NSString *item in items) {
NSString *ref = [item stringByMatching:myregex1 capture:2];
NSString *value = [item stringByMatching:myregex1 capture:3];
NSLog(@"%@ : %@", ref, value);
AllOrderItems = [AllOrderItems stringByAppendingFormat:(@"%@: %@ \r\n", ref, value)];
}
AllOrderItems没有显示:或者新行(\ r \ n)只显示参考号和&值字符串?
请帮忙
由于
答案 0 :(得分:1)
删除格式周围的括号:
AllOrderItems = [AllOrderItems stringByAppendingFormat:@"%@: %@ \r\n", ref, value];