---
title: "magic-regexp"
description: "Type-safe regular expression builder that compiles away at build time, giving readable chained syntax and typed capture groups."
canonical: "https://vibing.inc/library/magic-regexp-vg-0968"
category: "Dev Utilities & Vibe-Coding Tooling"
subcategory: "UnJS toolkit"
license: "MIT"
author: "UnJS / Daniel Roe (@danielroe)"
source: "https://unjs.io/packages/magic-regexp"
---

# magic-regexp
Type-safe regular expression builder that compiles away at build time, giving readable chained syntax and typed capture groups.
## Facts
- Source: https://unjs.io/packages/magic-regexp
- Category: Dev Utilities & Vibe-Coding Tooling / UnJS toolkit
- Author: UnJS / Daniel Roe (@danielroe)
- Licence: MIT
- Tags: regex, typescript, dx, unjs
## Why it's a gem
Turns unreadable regex into English and still costs zero runtime bytes.
---
Listed in The Vibeary: https://vibing.inc/library/magic-regexp-vg-0968 · JSON: https://vibing.inc/api/public/library/gems/magic-regexp-vg-0968