On Sun, Feb 03, 2008, Jeff Johnson wrote:
> [...]
>> I don't think you have to improve the glob. It is fully fine to first do
>> the globbing and then the filtering. The regex is what has to be more
>> precise and preferably even customizable.
>
> The question is more intellectual than practical:
> Can a glob be written that ... ?
> [...]
I think: no. The Unix wildcard based patterns are usually often too
weak for more sophisticated matching -- well, from a theoretical POV
they are already in a completely different class of expressiveness. As
a result one usually always ends up with additional filtering (based
on regular expressions). So, your do already a fts(3) walk instead of
glob(3) is also just fine as the regex filtering has to happen usually
always anyway...
Ralf S. Engelschall
rse@engelschall.com
www.engelschall.com
Received on Sun Feb 3 18:20:13 2008