请告诉我这个正则表达式有什么问题。我只需要字母,根本不需要数字。
NSError *error = NULL;
NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:@"^(?!\\s*$)()[a-zA-Z,\\w,.\\s,-]{2,50}$"
                                                                       options:NSRegularExpressionUseUnicodeWordBoundaries
                                                                         error:&error];
NSUInteger numberOfMatches = [regex numberOfMatchesInString:text
                                                    options:0
                                                      range:NSMakeRange(0, [text length])];
if (numberOfMatches == 1) {
    return  nil;
} else {
    return NSLocalizedString(@"name.validation.alert1", nil);
}
提前致谢。