I need to be ECMA-262 regex compliant and NSRegularExpression is ICU regex compliant. According to Wikipedia, there are a few difference between the two. - are there any NSRegularExpression
NSMatchingOptions
or options I can pass to make NSRegularExpression ECMA-262 compliant (or at least closer to compliant)?
Code:
NSError * error;
NSRegularExpression * regex = [NSRegularExpression regularExpressionWithPattern:regexString options:0 error:&error];
if (!error && [regex firstMatchInString:keyString options:0 range:NSMakeRange(0, keyString.length)]) {
return YES;
}