Pregunta

I have this regex method

NSString *string = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
NSString *regexStr = @"(<\/b>[A-F][+| |-]|<\/b>[A-F][+| |-] \(\d\d\.\d%\))";
NSError *error = nil;
NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:regexStr options:0 error:&error];

NSArray *matches = [regex matchesInString:string options:0 range:(NSRange){0, [string length]}];

for (NSTextCheckingResult *item in matches) {
    NSLog(@"%@", item);
}

But my output is of the form:

2014-04-08 02:27:27.710 MistarApp[11540:60b] <NSSimpleRegularExpressionCheckingResult: 0x1093f18a0>{8379, 6}{<NSRegularExpression: 0x1093f1470> (</b>[A-F][+| |-]|</b>[A-F][+| |-] (dd.d%)) 0x0}

And after like 4 or 5 of those, it fails and gets a SIGABRT. What do I log instead??

¿Fue útil?

Solución

There was a pretty significant error with the compiler. I deleted and recreated the project, that fixed the problem.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top