snippits/url-parser.regex

2 lines
193 B
Plaintext
Raw Permalink Normal View History

2023-08-02 20:31:17 -04:00
^(?:(?<protocol>https?):\/\/)?(?<host>(?<name>(?:(?<subdomain>.+?)\.)?(?<basedomain>.+?)(?:\.(?<domain>.+?))?)(?:\:(?<port>\d+))?)(?:(?<path>\/.+?))?(?:\?(?<query>.+?))?(?:#(?<fragment>.+?))?$