//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 obtenir chaque ref valeur & dans la chaîne AllOrderItems donc je peux le montrer dans un textViewAjouter chaque élément dans la chaîne
Merci
:)
Quelle est la vraie question? – JeremyP