Negative Regular Expression Generator

JSON →
library 1.0.2 ·javascript maintenance
verified May 27, 2026

regex-not, currently at version 1.0.2, is a utility package designed to simplify the creation of JavaScript regular expressions that match everything *except* a given string. It abstracts away the complexity of crafting negative lookahead assertions, which can be challenging and error-prone to write manually. The library is primarily a CommonJS module, targeted at Node.js environments from version 0.10.0 and above. Its release cadence is infrequent, suggesting a mature, stable API that is in a maintenance phase rather than active feature development. A key differentiator is its dual functionality: it can generate regexes for strict negation (the string does *not* exactly match) or 'contains' negation (the string does *not* contain the substring), providing flexibility for various inverse matching requirements.

total hits 13
actors 6 distinct systems
last hit 19h ago human
GPTBot
5
Script
1
ClaudeBot
1
Search engines
2
Humans
1

top countries 🇺🇸 United States · 🇨🇦 Canada · 🇩🇪 Germany · 🇫🇷 France · 🇸🇬 Singapore