Test, validate and match regular expressions
This PCRE regex matches HTTP or HTTPS URLs and breaks them down into components: protocol (http or https), hostname, optional port, optional path, and optional fragment identifier. It's useful for URL parsing, validation, and extraction in text content. The pattern handles standard web URLs with optional ports and paths.