---
title: "URL Pattern Matching in .NET"
url: https://daily.dev/posts/url-pattern-matching-in-net-eoobxiadc
source_url: https://www.meziantou.net/url-pattern-matching-in-dotnet.htm
type: article
source: "Meziantou"
published: 2026-04-20T13:18:56.430Z
updated: 2026-04-20T13:21:23.444Z
tags: [".net"]
reading_time: 2
upvotes: 29
comments: 4
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# URL Pattern Matching in .NET

**[Meziantou](https://daily.dev/sources/meziantou)** · 2 min read · 29 upvotes · 4 comments

## Summary

The Meziantou.Framework.Uri NuGet package brings the WHATWG URL Pattern API specification to .NET, enabling standardized URL pattern matching with named parameters, wildcards, optional segments, case-insensitive options, and pattern collections. The UrlPattern class supports both object-based and string-based pattern creation, making it useful for routing, security policies, and content filtering without resorting to custom regex.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.meziantou.net/url-pattern-matching-in-dotnet.htm>

## Community discussion

Top comments from developers on daily.dev.

**@guglielmorizzo** · 2 upvotes

> Cool, but what do I need it for?

**@ashishtripathi6** · 0 upvotes

> how ti's work

**@jeanclaudegeagea** · 0 upvotes

> Great but why is it used?

## Similar posts on daily.dev

- [URLPattern is now Baseline Newly available](https://daily.dev/posts/urlpattern-is-now-baseline-newly-available-seoslhsju) · web.dev · 110 upvotes · 3 comments

---

Tags: [#.net](https://daily.dev/tags/.net)

[View this post on daily.dev](https://daily.dev/posts/url-pattern-matching-in-net-eoobxiadc)
