On Monday 03 September 2007 20:28, Eric Bollengier wrote:
> On Monday 03 September 2007 19:12:12 Kern Sibbald wrote:
> > On Monday 03 September 2007 18:44, Eric Bollengier wrote:
> > > Hi,
> > >
> > > It's why we provide the bwild tool... If you are using something
> > > special, you can validate your expression with this tool.
> >
> > I don't imagine that you were directing that comment at me -- since I was
> > the person who wrote bwild :-)
>
> Yes i know :)
>
> I have looked some implementations of fnmatch and all of them are trying to
> respect the POSIX interface, but it's sure that some of them are wrong :-)
>
> glibc tests are better than before :
> [18] [/b matches [/b -> FAIL
To the best of my knowledge the following are not wildcard matches. If they
are can you point me to the definition of [:alpha:]?
> [36] *[[:alpha:]]/*[[:alnum:]] does not match a/b -> FAIL
> [37] *[![:digit:]]*/[![:d-d] does not match a/b -> FAIL
> [38] *[![:digit:]]*/[[:d-d] does not match a/[ -> FAIL
>
I think they have a broken test set -- someone confused wildcards and regular
expressions, or defined the test results backwards.
>From every definition I can find, wildcards included in fnmatch, contain only
*
?
[set]
[!set]
anything else is an extension that is not in basic shell wildcards or
something from regular expressions. You need to be careful because a lot of
documents refer to regular expressions as wildcards, but as you know, they
are not at all the same thing.
I have seen some documents that claim that {stringa,stringb} matches stringa
or stringb, but that seems to be rare, and in any case, it is not implemented
in the basic BSD fnmatch.
Kern
> [36] *[[:alpha:]]/*[[:alnum:]] does not match a/b -> FAIL
> [37] *[![:digit:]]*/[![:d-d] does not match a/b -> FAIL
> [38] *[![:digit:]]*/[[:d-d] does not match a/[ -> FAIL
>
> [ 0] *LIB* does not match lib -> OK
> [ 1] *LIB* matches lib -> OK
> [ 2] a[/]b matches a/b -> OK
> [ 3] a[/]b does not match a/b -> OK
> [ 4] [a-z]/[a-z] matches a/b -> OK
> [ 5] * does not match a/b -> OK
> [ 6] *[/]b does not match a/b -> OK
> [ 7] *[b] does not match a/b -> OK
> [ 8] [*]/b does not match a/b -> OK
> [ 9] [*]/b matches */b -> OK
> [10] [?]/b does not match a/b -> OK
> [11] [?]/b matches ?/b -> OK
> [12] [[a]/b matches a/b -> OK
> [13] [[a]/b matches [/b -> OK
> [14] \*/b does not match a/b -> OK
> [15] \*/b matches */b -> OK
> [16] \?/b does not match a/b -> OK
> [17] \?/b matches ?/b -> OK
> [19] \[/b matches [/b -> OK
> [20] ??/b matches aa/b -> OK
> [21] ???b matches aa/b -> OK
> [22] ???b does not match aa/b -> OK
> [23] ?a/b does not match .a/b -> OK
> [24] a/?b does not match a/.b -> OK
> [25] *a/b does not match .a/b -> OK
> [26] a/*b does not match a/.b -> OK
> [27] [.]a/b does not match .a/b -> OK
> [28] a/[.]b does not match a/.b -> OK
> [29] */? matches a/b -> OK
> [30] ?/* matches a/b -> OK
> [31] .*/? matches .a/b -> OK
> [32] */.? matches a/.b -> OK
> [33] */* does not match a/.b -> OK
> [34] *?*/* matches a/.b -> OK
> [35] *[.]/b matches a./b -> OK
> [39] *[![:digit:]]*/[![:d-d] does not match a/[ -> OK
> [40] a?b matches a.b -> OK
> [41] a*b matches a.b -> OK
> [42] a[.]b matches a.b -> OK
> [43] *a* matches a/b -> OK
> [44] *a? matches ab/c -> OK
> [45] a? matches ab/c -> OK
> [46] ?*/? matches a/b -> OK
> [47] */? matches /b -> OK
> [48] **/? matches /b -> OK
>
>
> Bye
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Bacula-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-devel