Dear Sirs,

I'm currently implementing a program which will run thousands and
thousands times. It uses regular expressions.

something really simple, like

regex_t re;
regcomp(&re,"^[0123456789abcdefghijklmnopqrstuvwxyz]{1,8}$",
                                         REG_EXTENDED+REG_ICASE);
return(!regexec(&re,name,0,0,0));

so, questions are:

1) is it faster to "compile" regex once and load it from file every time
   program starts ?

2) how to store in a file data of type "regex_t" ??

Regards, (Наилучшие пожелания)
Ilia Chipitsine (Илья Шипицин)


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to