Test, validate and match regular expressions
This regex matches URLs with optional protocol (http/https), user info, IPv4 or domain host, port, and path. It is commonly used for extracting or validating web addresses in text, supporting both simple and complex URLs. The pattern is robust for typical URL structures but does not handle query strings or fragments as separate components.