Re: Using Debian GNU/Linux as base for commercial linux
> On Thu, 20 Aug 1998, Philip Hands wrote:
>
> > > However, with these rules, if someone uploads a new package named
> > > binary-frobnicator-2.44.1-2 you'll ignore it. Unless I'm missing
> > > something obvious, this is another case where globs are not the right
> > > tool for the job.
> > >
> > > What I really want to say is:
> > >
> > > + .*/binary-(i386|all)/?
> > > - .*/binary-[^/]*/?
> >
> > How does that fail to exclude binary-frobnicator-2.44.1-2 ?
> >
> > Seems like the ``-'' pattern still matches to me.
>
> the trailing "/" on the pattern makes the difference.
>
> binary-frobnicator-2.44.1-2.deb is a file, and therefore doesn't have a
> trailing /, so it doesn't match the exclude pattern.
>
> ".*/binary-[^/]*/?" matches every string which contains "/binary-"
> followed by 0 or more characters which are NOT "/", followed by a "/"
> and at least one more character.
Ah, I see :-)
You're getting your globs and REs mixed up.
. == any single character in RE
? == any single character in glob
but
? in REs means the previous character (``/'' in this case) is optional.
so that RE does match binary-frobnicator-2.44.1-2.deb, since it has zero /s on
the end, which matches /?
Cheers, Phil.
Reply to: