views:

32

answers:

1
    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)];       

    }

the AllOrderItems is not showing the : or the new lines(\r\n) just the ref & value strings ?

Please help

Thanks

+1  A: 

Remove the brackets around your format:

AllOrderItems = [AllOrderItems stringByAppendingFormat:@"%@: %@ \r\n", ref, value];       
w.m
Thanks bro :) that was the trick