This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Python regular expressions for IPv4 and IPv6 addresses and URI-references, | |
| # based on RFC 3986's ABNF. | |
| # | |
| # ipv4_address and ipv6_address are self-explanatory. | |
| # ipv6_addrz requires a zone ID (RFC 6874) follow the IPv6 address. | |
| # ipv6_address_or_addrz allows an IPv6 address with optional zone ID. | |
| # uri_reference is what you think of as a URI. (It uses ipv6_address_or_addrz.) | |
| import re |
NewerOlder