Build, test, and debug regular expressions
This regex matches URLs and breaks them into named capture groups: protocol (http/https, ftp/ftps, irc/ircs), optional user:password credentials, host (with optional 'www.' prefix and port number), request path, query string, and anchor fragment. All components except the host are optional, allowing it to match partial URLs without a scheme or path. It's useful for URL extraction from text, link parsing, and analyzing URL structure in log files or user input.