Build, test, and debug regular expressions
Parses simple URLs into labeled parts: it captures the protocol (word characters before '://'), the hostname (word characters and dots), and an optional trailing path into separate groups, using inline (?#...) comments for documentation. With global and multiline flags, it can extract or split URLs across multiple lines of text. Suited for basic URL parsing in logs or tutorials, but won't handle ports, hyphens, credentials, or query strings separately.