//Parse this shit
//Create array of all items in order (with submatches still
NSString *myregex1 = @"\\<([a-z0-9]+)\\sref\=\"([^\"]*)\">([^\<]*)\\<\\/\\1\>";
//Get all items in an array
NSArray *items = [stringReply componentsMatchedByRegex:myregex1];
//Create string to hold all items in
NSString *AllOrderItems;
if ([items count] > 0) {
for (NSString *item in items) {
//NSLog(@"%d", i );
NSString *ref = [item stringByMatching:myregex1 capture:2];
NSString *value = [item stringByMatching:myregex1 capture:3];
NSLog(@"Current Item: %@ : %@", ref, value);
AllOrderItems = [NSString stringWithFormat:(@"%@%@: %@\n", AllOrderItems, ref, value)];
OrderDetails.text = AllOrderItems;
}
}
Im tring to get each ref & value into the string AllOrderItems so i can show it in a textView
Thanks
:)