magic-regexp icon indicating copy to clipboard operation
magic-regexp copied to clipboard

A compiled-away, type-safe, readable RegExp alternative

Results 46 magic-regexp issues
Sort by recently updated
recently updated
newest added

### 🐛 The bug When maybe() contains named capture groups (created via .as()), magic-regexp fails to correctly wrap the entire content of maybe() as a non-capturing group and make it...

bug
good first issue

### 🐛 The bug The `maybe()` helper sometimes return wrong value. For example: ```ts import { createRegExp, exactly, maybe } from 'magic-regexp'; const regexp = createRegExp(maybe(exactly('a').or('b'), exactly('1').or('2'))); // Expected: maybe...

bug

### 🆒 Your use case When working with simple character classes, I often find myself wanting to directly use traditional regex notation. For example, I need to match any of...

enhancement

### 🆒 Character Range Issues | Description | Current | Generated Pattern | Expected Pattern | |-------------|---------|-------------------|-----------------| | Number Range | `charIn('1-9')` | `/[1\-9]/` | `/[1-9]/` | | Alternatives |...

enhancement

### 🐛 The bug When building the docs, I get the error `The requested module 'file:///Users/ezra/Projects/OSS/magic-regexp/node_modules/.pnpm/[email protected]/node_modules/ohash/dist/index.mjs' does not provide an export named 'diff'` when prerending the `/` route. Error snippet...

bug

### 🆒 Your use case I'm currently using this wonderful library via the runtime on an Expo project which uses the Metro/Babel bundler/transformer. I'm wondering if there is a supported...

enhancement