| ▲ | meindnoch 21 hours ago | |||||||
Is that so? RFC 3986 Appendix B [1] "Parsing a URI Reference with a Regular Expression": The following line is the regular expression for breaking-down a well-formed URI reference into its components.
Let's test your URI with this regex, shall we? [2]
Seems correct to me.[1] https://datatracker.ietf.org/doc/html/rfc3986#appendix-B | ||||||||
| ▲ | quuxplusone 20 hours ago | parent | next [-] | |||||||
Hm, but I think he's right. The problem comes when you try to break down the authority portion into host and port; TFA's parser treats the first colon as introducing the port, which is wrong. https://github.com/bkaradzic/bx/blob/0b001f5f36579e8aea07efa... | ||||||||
| ||||||||
| ▲ | afiori 17 hours ago | parent | prev | next [-] | |||||||
> well-formed URI A parser that assumes the input to be already valid is usually not enough for most applications according to that regex this is a valid url __..__..%%%zz.. | ||||||||
| ||||||||
| ▲ | f311a 17 hours ago | parent | prev [-] | |||||||
Regexes are pretty slow, though. | ||||||||
| ||||||||