Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document how to create a pattern to match any IP address hostname #41

Open
sethmlarson opened this issue Dec 6, 2018 · 3 comments
Open

Comments

@sethmlarson
Copy link
Member

Put it within abnf_regex, useful for libraries that need to determine if a host is an IP address or not (For IDNA encoding, for example).

@sigmavirus24
Copy link
Collaborator

Can we document this instead of providing it directly? abnf_regexp.IPv4_RE and abnf_regexp.IP_LITERAL_RE would be combined to provide this support and I'm not sure that it would be terrible for the consumers that want this to do something like:

from rfc3986 import anbf_regexp

ALL_IP_RE = "({}|{})".format(abnf_regexp.IPv4_RE, abnf_regexp.IP_LITERAL_RE)

There's no maintenance cost to adding it to the library except not accidentally removing/breaking it.

@sethmlarson
Copy link
Member Author

That seems acceptable to me.

@sigmavirus24
Copy link
Collaborator

Re-opening to track for our docs

@sigmavirus24 sigmavirus24 changed the title Create a pattern to match any IP address hostname Document how to create a pattern to match any IP address hostname Apr 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants