All Topics
All Topics
Technology
Technology
Design
Design
Programming
Programming
Science
Science
News
News
Gaming
Gaming
Entertainment
Entertainment
Business
Business
Finance
Finance
Sports
Sports
Health
Health
Food
Food
Travel
Travel
Art
Art
Music
Music
Books
Books
Education
Education
Politics
Politics
Personal
Personal
No algorithm. No AI slop. No ads. Just RSS. Pro-human. Indie writers. Real journalism. Open web. Chronological. Hand toasted.

URL Pattern API Documentation: Syntax and Usage for URL Pattern Matching

By

thunderbong

5mo ago· 15 min readen

Summary

The article provides documentation for the URL Pattern API, a web API that defines a syntax for creating URL pattern matchers. It explains that patterns are specified using the URLPattern interface and are based on the path-to-regexp JavaScript library syntax, similar to Ruby on Rails. The API allows patterns to contain capturing groups that extract parts of matched URLs, and patterns can be matched against full URLs or individual URL components. The content covers concepts, usage, interfaces, and pattern syntax details.

Key quotes

· 5 pulled
Patterns are specified using the URLPattern interface.
The pattern syntax is based on the syntax from the path-to-regexp library.
The pattern can contain capturing groups that extract parts of the matched URL.
The syntax for patterns is based on the path-to-regexp JavaScript library.
These patterns can be matched against URLs or individual URL components.
Snippet from the RSS feed
The URL Pattern API defines a syntax that is used to create URL pattern matchers. These patterns can be matched against URLs or individual URL components.

You might also wanna read