Any regex wizard reading this?
If so, what is the C POSIX regex (you know regcomp & friends) equivalent of this python regular expresion:
re.compile(r'^([a-z][a-z0-9_\-\.]*)=', re.IGNORECASE)
Because it sure isn't this:
regcomp(&re,"^([a-z][a-z0-9_\-\.]*)=",REG_ICASE)
I have been playing with it for two hours and am bored :-)
Me, no idea, but you .htaccess files are messed up, since the post permalink redirects to your host 404 page.
not sure, but maybe you need to convert -> \
Try regcomp(&re, "^\([a-z][a-z0-9_\-\.]*\)=", REG_ICASE);
or:
regcomp(&re, "^([a-z][a-z0-9_\-\.]*)=", REG_ICASE | REG_EXTENDED);
Some slashes disappeared in my comment. Imagine there's two slashes for every one there.
I vote for the double backslash too -- think of the same reason why python needs two of them unless you're using raw strings. (what is backslash-n for C? :) surely you'd mean matching on a literal backslash-n not insert a newline in your regex)
Just escaping the backslashes is not enough.
regcomp(&re,"^([a-z][a-z0-9_\-\.]*)=",REG_ICASE)
doesn't even compile:
/home/ralsina/Desktop/proyectos/qmail/ra-plugins/svn/raspf/raspf.c:235:32: warning: unknown escape sequence '-'
/home/ralsina/Desktop/proyectos/qmail/ra-plugins/svn/raspf/raspf.c:235:32: warning: unknown escape sequence '.'
My best effort so far is
regcomp(&re,"^([a-z][-a-z0-9_.]*)=",REG_ICASE)
Which seems to work.
Remember these are **not** perl/python regexps :-P
Ok, never mind, I shouldn't try to code at 7AM :-)
Yes, the double backslashes are the thing.