Hello,
I am trying to get match to 0x00306008, the regex is working well when i test it on http://www.regex-tester.de/regex.html but when i put it into this code it does not work any more, can you please take a look what is wrong, thank you!
I am trying to get match to 0x00306008, the regex is working well when i test it on http://www.regex-tester.de/regex.html but when i put it into this code it does not work any more, can you please take a look what is wrong, thank you!
PHP:
NSString *stringx = @"aaaaaaaaaaaaaa0x00306008bbbbbbbbbbbbbbbbb";
NSString *regex = @"0x[0-9a-fA-F]{8}";
NSPredicate *regexPredicate = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", regex];
BOOL match = [regexPredicate evaluateWithObject:stringx];
NSLog(@"Match: %i", match);