Test, validate and match regular expressions
Matches hash-based routes in web applications, capturing the path and optional query parameters separately. Useful for single-page applications (SPAs) that use hash routing. The first group captures the path portion starting with '/', while the second optional group captures any query parameters starting with '?'.