[lug] glibc regexp bug?

David Anselmi anselmi at anselmi.us
Tue Jun 7 20:14:29 MDT 2005


D. Stimits wrote:
[...]
> I'm trying to verify if the regular expression is valid or 
> not...regcomp() always fails on this expression:
> "*".

Looks to me like you want to look in the glibc docs, which seem not to 
say.  But they refer to "extended regular expressions" and "basic 
regular expressions".  It looks like SUS might be the place those are 
defined:

http://www.opengroup.org/onlinepubs/007908799/xbd/re.html

And that seems to say that for a basic RE a leading * matches the 
asterisk character and for extended REs a leading * is undefined.

Seems that a bit of code and the error message would be helpful.

Dave



More information about the LUG mailing list