문제

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??

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top