我有一个必须使用正则表达式的项目,所以我决定使用RegexKitLite,我下载了它,将RegexKitLite.m添加到“编译源”中,并将RegexKitLite.h 添加到“复制文件”部分。将 libicucore.A.dylib添加到项目库中。将 RegexKitLite.h导入我的班级,并编写代码(仅用于测试):
NSString *str = @"testing string";
if ([str isMatchedByRegex:@"[^a-zA-Z0-9]"])
{
NSLog(@"Some message here");
}
之后我有错误消息:
-[__NSCFString isMatchedByRegex:]: unrecognized selector sent to instance 0x1ed45ac0
2013-02-28 19:46:20.732 TextProject[8467:907] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString isMatchedByRegex:]: unrecognized selector sent to instance 0x1ed45ac0'
我错过了什么?请帮我..