[lug] glibc regexp bug?
D. Stimits
stimits at comcast.net
Tue Jun 7 10:53:54 MDT 2005
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).
Yes, that's what I'm trying to deny or verify...that a * by itself is
not valid or is valid. I know that .* is any number of any atom, but in
the past * by itself also yielded this result. I believe that you are
right that the * by itself is not valid, but my regular expression
expertise isn't enough to be certain. I guess if BLUG had to pick a new
name someone might name it "Interesting Programming and Computer Trivia
Group", I figure someone here will know (I've seen a huge number of
regular expression and perl shortcut discussions here...probably as many
as in the rest of the Internet combined) :P
D. Stimits, stimits AT comcast DOT net
More information about the LUG
mailing list