Test, validate and match regular expressions
This regex matches URLs with a specific structure: an optional scheme/authority, a mandatory path segment containing a 4-letter identifier and locale code (like /shop/en-us/), followed by additional path content and optional query parameters. It captures various URL components including host, locale, path, and query key-value pairs. Common use cases include parsing localized API endpoints or structured web application routes.