Not TestedTesting not done, may not work properly
Networking

URLPattern API

Match URLs against standardized pattern templates using wildcard path segments.

Checking support...
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