Build, test, and debug regular expressions
Matches and parses URLs by capturing their components: an optional protocol (http:// or https://), the domain/host (characters up to the first slash), the path (characters up to a question mark), and an optional query string starting with '?'. The global flag finds all URL occurrences in text. Commonly used for URL extraction and parsing, though it's lenient and may also match non-URL strings like plain words or file paths.