• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Cocoa application and regular expression
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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;
    regex_t rg;
    bool ret;
 
    ...
    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

  • Follow-Ups:
    • Re: Cocoa application and regular expression
      • From: Frederick Cheung <email@hidden>
  • Prev by Date: Re: CFDictionaryCreateMutableCopy crash
  • Next by Date: Re: CFDictionaryCreateMutableCopy crash
  • Previous by thread: Webkit webview issues... with search and highlight...
  • Next by thread: Re: Cocoa application and regular expression
  • Index(es):
    • Date
    • Thread