Ilia Chipitsine wrote: > 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" ??
Try using flex. Lars -- Lars Eggert <[EMAIL PROTECTED]> Information Sciences Institute http://www.isi.edu/larse/ University of Southern California
smime.p7s
Description: S/MIME Cryptographic Signature