/Knowledge/sources/honojs__hono/llms-full/routers-regexprouter--c8425f585cdd.md
Routers: RegExpRouter - hono-docs
Routers: RegExpRouter Source evidence: /Sources/honojs hono/provenance.md Canonical citation: https://hono.dev/llms full.txt regexprouter Summary RegExpRoute...
Routers: RegExpRouter
Source evidence: /Sources/honojs__hono/provenance.md Canonical citation: https://hono.dev/llms-full.txt#regexprouter
Summary
RegExpRouter is the fastest router in the JavaScript world. Although this is called "RegExp", it is not an Express-like implementation using path-to-regexp. They are using linear loops. T...
Content
RegExpRouter is the fastest router in the JavaScript world.
Although this is called "RegExp", it is not an Express-like implementation using path-to-regexp. They are using linear loops. Therefore, regular expression matching will be performed for all routes and the performance will be degraded as you have more routes.
Hono's RegExpRouter turns the route pattern into "one large regular expression". Then it can get the result with one-time matching.
This works faster than methods that use tree-based algorithms such as radix-tree in most cases.
However, RegExpRouter doesn't support all routing patterns, so it's usually used in combination with one of the other routers below that support all routing patterns.
Metadata
{
"chunk_index": 0,
"citation": "https://hono.dev/llms-full.txt#regexprouter",
"coverage_role": "overview",
"qualified_title": "Hono / llms-full / Routers > RegExpRouter",
"retrieved_at": "2026-07-02T05:51:01Z",
"section_index": 543,
"source_id": "/honojs/hono",
"source_type": "llms_full",
"target_label": "llms-full",
"title": "Routers: RegExpRouter",
"upstream_url": "https://hono.dev/llms-full.txt",
"version": "2026"
}