[lug] glibc regexp bug?

Andrew F. Gilmore agilmore at wirelessbeehive.com
Tue Jun 7 10:54:28 MDT 2005


On Tue, 2005-06-07 at 18:38 +0200, rm at fabula.de wrote:
> On Tue, Jun 07, 2005 at 10:37:57AM -0600, 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?
> Hi,
> 
> are you talking about a single '*' character? That's a metacharacter (modifier)
> that is only valid after a pattern. Maybe you mean ".*" (zero or more occurences
> of any character).

'*' is a valid shell wildcard, but is not a valid regexp. I've been
bitten by this in the past as well.

Andrew
-- 
Andrew F. Gilmore <agilmore at wirelessbeehive.com>




More information about the LUG mailing list