snippits/url-parser.regex

2 lines
193 B
Plaintext

^(?:(?<protocol>https?):\/\/)?(?<host>(?<name>(?:(?<subdomain>.+?)\.)?(?<basedomain>.+?)(?:\.(?<domain>.+?))?)(?:\:(?<port>\d+))?)(?:(?<path>\/.+?))?(?:\?(?<query>.+?))?(?:#(?<fragment>.+?))?$