# safe-regex — card for AI agents

Detect potentially catastrophic exponential-time regex patterns.

Category: Utilities · npm package `safe-regex` · latest version 2.1.1 (checked 2026-11-01)
Install: `npm install safe-regex`
License: MIT (permissive)

In your own product (generator, app, hosted service): **yes**. Permissive license: ship it inside your own product, closed or open source, and keep its license and copyright notice.

## Numbers (AgentGid data)
- Gid Score: 50.2 (#1951 of all tools, 215 of 408 in its category)
- Used in 8 public projects set up for AI coding agents (0.1%)
- Downloads last week: 25,717,213 (as of 2026-11-24), +33.3% over 4 weeks
- GitHub stars: 194 (as of 2026-11-24)
- Last push: 2022-11-01

## Often used with
Zod 100.0%, Vitest 95.7%, clsx 91.3%, fetch-socks 91.3%, ioredis 91.3%, Lucide React 91.3%

## Links
- AgentGid page: https://agentgid.com/tools/safe-regex/
- Homepage: https://github.com/davisjam/safe-regex
- Repository: https://github.com/davisjam/safe-regex

---
AgentGid's catalog is curated: every entry was checked against the maker's official pages (registry, repository, license and pricing pages) on the date shown; a license value shows the quote it stands on wherever AgentGid has one. Usage numbers come from AgentGid's own scan of public repositories set up for AI coding agents. Claims by makers are reported, not tested by AgentGid.
