ietf-nntp new draft of the NNTP spec released

Russ Allbery rra at stanford.edu
Mon Jul 19 16:48:03 PDT 1999


[ Resending a previous message because I wasn't subscribed properly. ]

pmee <pmee at uk.tobit.com> writes:

> Is it not therefore good practice to extend the wildmat notation to
> include an extensive ! notation and include the , character as a wildmat
> special command?

No, I'd say it's a bad idea, partly because no one actually implements
that but mostly because it doesn't give you any additional descriptive
power.  It just makes the wildmat matcher harder to implement.

> 2) ! may be used within a wildmat as a command to add negation to the
> individual section of a wildmat (sections delimited by the . character)
> or where no . character follows the ! character, to negate the rest of
> the wildmat with the rest of the string match.  Examples:

>      alt.* matches any group beginning with alt.
>      alt.binaries*  matches all groups in alt.binaries
>      alt.*!binaries matches all groups not in alt.binaries
>      alt.*!binaries* matches all groups not in alt.binaries*
>      alt.*!*binaries* matches all groups in alt. that do not contain the
>        word binaries after the alt.
>      alt.*!*binaries*.* matches all groups in alt. whose second section
>        does not contain the word binaries.  I.e., alt.example,
>        alt.example.binaries but not alt.wierdbinariesfortrouble.example
>      alt.*.*!*erot* matches any alt. group that does not contain the
>        four chars erot in the third part (note that this does not match
>        alt. groups that do not have a third part)
>      alt.*!*binaries*.*!*erot* matches any alt. group that has three parts
>        -and- does not contain the word binaries in the second part -and- does
>        not contain the four chars erot in the third part

Note the equivalences:

        alt.*!binaries                  alt.*,!alt.binaries
        alt.*!binaries*                 alt.*,!alt.binaries*
        alt.*!*binaries*                alt.*,!alt.*binaries*
        alt.*!*binaries*,*!*erot*       alt.*,!*.*binaries*,!*.*.*erot*

etc.  This doesn't exactly implement your above textual description, but
that's not because of the power of '!'.  That's because * in your
descriptions suddenly isn't matching '.' in some circumstances and is in
others, which certainly isn't the historical behavior of wildmat.

>  When used in combination with the , character the wildmat would (I'd
> advise) indicate a list of separate wildmats with the first having least
> precedence and the last having most precedence.  Therefore
> alt.*,alt.*!*binaries*,alt.weirdbinaries* would match alt.example and
> alt.weirdbinariestomatch but not alt.otherbinariestomatch and not
> alt.useless.weirdbinariestomatch.

alt.*,!alt.*binaries*,alt.weirdbinaries* already does this too.  Sticking
with the existing language also has the advantage that people already know
how to read and write wildmat expressions like the above.

Also note that wildmat expressions are not limited in domain just to
newsgroups.  Even news servers use them for matching various other things.
It's important to keep that in mind before doing anything like special-
casing '.'.

-- 
Russ Allbery (rra at stanford.edu)         <URL:http://www.eyrie.org/~eagle/>



More information about the ietf-nntp mailing list