curl / Mailing Lists / curl-library / Single Mail

curl-library

Re: wildcard matching

From: Daniel Stenberg <daniel_at_haxx.se>
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...

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2018-01-27