A lightweight TypeScript utility for building, testing, and managing regular expressions with autocomplete-friendly patterns and flags.
- 🧠 Type-safe patterns and flags with autocomplete support
- ⚡ Lightweight RegExp wrapper with zero dependencies
- 🧩 Predefined common regex patterns for faster development
- 🧱 Extensible design for future regex helpers
-
Deno:
import { Regex, type Flags, type Patterns } from 'jsr:@dep/regex';
-
Node.js (18+) or Browsers:
npx jsr add @dep/regex
Then import as an ES module:
import { Regex, type Flags, type Patterns } from '@dep/regex';
import { Regex } from '@dep/regex';
// Create a new regex with autocomplete-supported pattern and flags
const regex = new Regex('[a-z]+', 'gi');
console.log(regex.test('hello')); // true
console.log(regex.test('123')); // falseMIT License – see LICENSE for details.
Author: Estarlin R (estarlincito.com)