//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, чтобы получить каждое значение исх & в строку AllOrderItems, так что я могу показать его в TextViewДобавить каждый элемент в строку
Благодарности
:)
Что собственно вопрос? – JeremyP