From: William Lupton <[email protected]>
Sent: 07 September 2022 11:11

I think that the most relevant bits are:

[3]   piece   ::=   atom quantifier?
[9]   atom   ::=   Char | charClass | ( '(' regExp ')' )
[4]   quantifier   ::=   [?*+] | ( '{' quantity '}' )

In https? we have five pieces, of which only the last has a quantifier

So https? means h, t, t, p, optional-s

If you want the '?' to apply to more, then you need parentheses, e.g., (https)?.


<tp>

Thank you for that.  I was wrong!

I do note that in 
[3]   piece   ::=   atom quantifier?
 the meaning of the question mark is different else it would allow
[3]   piece   ::=   atom quantifie
Sigh.

Tom Petch


On Wed, 7 Sept 2022 at 10:29, tom petch 
<[email protected]<mailto:[email protected]>> wrote:
I commented recently on a draft that said that a regex of
https?
would match http which I said it would not.  The author said that he had tested 
it ok so I turned to XML Schema Part 2 as referenced by RFC7950 which tells me 
that
S?   the empty string, and all strings in L(S)
where L(S) is not explained and my set theory is too rusty to help.

Can anyone confirm for me that I am wrong, and that the Author is right?

Tom Petch
_______________________________________________
netmod mailing list
[email protected]<mailto:[email protected]>
https://www.ietf.org/mailman/listinfo/netmod

_______________________________________________
netmod mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/netmod

Reply via email to