Named capture groups ((?<protocol>...)) let you pull each piece of a URL out individually instead of just confirming the whole thing matched — useful for log parsing or rewriting URLs.
Only matches http/https. Other schemes (ftp://, mailto:, ws://) won't match this pattern — extend the protocol group if you need those too.