Cocoa application and regular expression
Cocoa application and regular expression
- Subject: Cocoa application and regular expression
- From: "Emmanuel Verlynde" <email@hidden>
- Date: Thu, 23 Sep 2004 13:08:52 +0200
- Organization: Opendisc
Where can i find regex tutorial???
I try to use regular _expression_ but always return
false...
#include <regex.h>
...
-(bool)checkStr: (const char *)str
{
char * pattern;
...
pattern =
"^\\d{5}$";
...
regcomp(&rg,
pattern);
ret = !(regexec(&rg, str, 0,
NULL, 0));
regfree(&rg);
return (ret);
}
...
if ([self checkStr: [myNSString
cString]])
{
...
}
...
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden