How to write pattern to match LAN addresses? (192.168.*) #258
-
Hi, I'm an average developer with not rich experience, my problem is when I try to write a pattern to match LAN ip hostname, the result is not what I want. let pt = new URLPattern("http://192.168.*:*")
pt.hostname // '192.0.0.168*' |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Yeah, I think this is an issue with how we currently canonicalize hostname parts. It might be one we're able to resolve if nobody is yet depending on the current behavior. I made a note of it in an issue comment somewhere, but it might not have its own separate issue, so filing one would be a good idea. This can be worked around (at least, in contexts where you aren't restricted to patterns which do not have regexp groups, by using that to avoid canonicalization:
|
Beta Was this translation helpful? Give feedback.
Yeah, I think this is an issue with how we currently canonicalize hostname parts. It might be one we're able to resolve if nobody is yet depending on the current behavior. I made a note of it in an issue comment somewhere, but it might not have its own separate issue, so filing one would be a good idea.
This can be worked around (at least, in contexts where you aren't restricted to patterns which do not have regexp groups, by using that to avoid canonicalization: