[lug] glibc regexp bug?

John Hernandez John.Hernandez at noaa.gov
Tue Jun 7 10:50:22 MDT 2005


"*" is normally used as a postfix operator.  "*" specifies a match for
zero or more occurrences of the preceding expression.  I'm not sure
what's supposed to happen in the absence of any preceding expression,
but you can try ".*" instead, where the "." means "any character".

D. Stimits wrote:
> I'm helping to debug some software which uses the regular expression
> functions of glibc: regcomp(), regexec(), regerror(), and regfree().
> These functions behave as expected on older linux releases such as RH
> 7.3, and some of the current releases of distros that don't update a lot
> (not sure which, probably debian). On fedora core 2 and 3 it breaks
> (possibly core 1, no way to test).
> 
> I'm trying to verify if the regular expression is valid or
> not...regcomp() always fails on this expression:
> "*". Just a plain old wildcard that should stand for "any number of any
> character". Can anyone tell me if "*" is technically not a valid regular
> expression? Or is this a bug in glibc on fedora?
> 
> D. Stimits, stimits AT comcast DOT net
> _______________________________________________
> Web Page:  http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
> Join us on IRC: lug.boulder.co.us port=6667 channel=#colug

-- 

 |  John Hernandez - NOAA Boulder NOC - 303-497-6392
 |  Mailstop R/OM62. 325 Broadway, Boulder, CO 80305
 |  PGP Public Key ID: 586A7E23



More information about the LUG mailing list