Networking
URLPattern API
Match URLs against standardized pattern templates using wildcard path segments.
Checking support...
Feature Not SupportedThis browser does not support the URLPattern API Web API feature. Try testing in a modern browser (such as Chrome, Edge, Safari, or Firefox).
Advertisement
Interactive Input Workspace
Ready for input
Web API Execution Output
Result output will be displayed here after processing...
Native JavaScript Code Example (Zero Libraries)
if ('URLPattern' in window) {
const pattern = new URLPattern({ pathname: '/tools/webapi-utils/:tool' });
console.log(pattern.test(location.href));
}About the URLPattern API Web API
URLPattern matches URLs against pattern syntax similar to route matchers in frameworks.
Specification:W3C & WHATWG Web API Standard
Sponsored Content