ietf-nntp Wildmats

Russ Allbery rra at stanford.edu
Thu Nov 16 13:41:42 PST 2000


Charles Lindsey <chl at clw.cs.man.ac.uk> writes:

> Suppose \S stands for "please match whitespace here". No, I am not
> suggesting that as a notation, just to illustrate my argument for now.
> Then, if PAT follows the current XPAT semantics, we get

> 	(X)PAT Subject 123- *foo bar*
> meaning the same as
> 	(X)PAT Subject 123- *foo\Sbar*

> But now look at
> 	(X)PAT Subject 123- *foo,bar bar,baz*
> meaning the same as
> 	(X)PAT Subject 123- *foo,bar\Sbar,baz*

> The first one looks like it is intended to match:
> 	Subject: foo bar
> 	Subject: foo baz
> 	Subject: bar bar
> 	Subject: bar baz
> whereas the second one looks like it is intended to match
> 	Subject: foo
> 	Subject: bar bar
> 	Subject: baz

> But they can't both be right :-( .

I don't see this as a significant issue.  We just define in the standard
what it means.  Personally, I would expect your first command to match
only "Subject: foo bar" and none of the rest of your examples, but using
space as alternation seems very odd to me.

My preference at the moment is to standardize on being able to escape a
comma with \, forbid spaces in wildmats, introduce \uXXXX (and probably \U
as well), and say that PAT takes only one argument.  It makes PAT look
different than XPAT; I have no problems with that.  I think XPAT was
broken as designed.

(Note that \u and \U was Andrew Gierth's idea originally and originally I
was opposed, but I think I'm coming around.)

If you want to match the set of things in your first list of Subject
headers, you can write *foo,bar*.

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



More information about the ietf-nntp mailing list