curl / Mailing Lists / curl-library / Single Mail


Re: wildcard matching

From: Daniel Stenberg <>
Date: Sat, 27 Jan 2018 22:09:41 +0100 (CET)

On Sat, 27 Jan 2018, Patrick Monnerat via curl-library wrote:

> From the curl_fnmatch.c code and unit1307.c tests, I can see that currently,
> a negated character set pattern can match the end of string.
> Example: "a" is matched by pattern "a[^b]".
> It is not what shell globing does: the end of data can only be matched by
> the end of the pattern.
> Is it intentional or a bug ?

I'd say it is a bug. I fixed a bug in there recently and I couldn't find any
proper docs describing how it is supposed to work and I took an easy route and
made a decision. I suppose it should work like the fnmatch() function -
although I couldn't really find any good docs for that pattern either.

This is a function that seems to be virtually unused...

Received on 2018-01-27