# devongovett/regexgen

Generate regular expressions that match a set of strings

Repository: https://github.com/devongovett/regexgen
Canonical: https://ross.abutalabs.com/products/regexgen
Homepage: https://runkit.com/npm/regexgen
Language: JavaScript
License Family: other
Last push: 2024-02-15T03:01:52+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 3543, "days_push": 930, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases, no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3422, forks 102 (observed 2026-08-28T04:08:03.817718+00:00)

## What it is
A JavaScript library and CLI that generates minimal regular expressions matching a given set of strings, using a trie, DFA minimization, and Brzozowski's algebraic method. It supports Unicode/ES2015 regex output and is installable via npm.

## Use cases
- generate a regex from a list of example strings
- build compact regexes for emoji sequences
- automatically create regex for keyword matching
- minimize regular expressions covering a string set
- generate regex patterns from sample data via CLI

## When to choose
- you have a finite set of strings and want a compact regex matching exactly those
- you want programmatic regex generation in Node.js or a quick CLI one-liner
- you need Unicode-aware regexes including emoji ZWJ sequences

## When to avoid
- you need regexes from examples that generalize beyond the given strings
- you need regex generation in a non-JavaScript runtime
- you need full regex features like backreferences or lookarounds

## Facets
- artifact type: library
- maturity: maintenance
- function: parser, developer-tools
- domain: developer-tools, programming-languages
- platform: cli, cross-platform
- tags: regex-generation, trie, dfa-minimization, javascript, algorithms, nodejs

## Member repositories
- devongovett/regexgen (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:03.817718+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:38:08.389566+00:00, confidence not recorded.
  - readme: https://github.com/devongovett/regexgen (fetched 2026-08-28T04:08:03.817718+00:00, sha 4d41e00b78bf)
  - registry_npm: https://registry.npmjs.org/regexgen (fetched 2026-08-29T09:32:18.462204+00:00, sha d4fa7d3065d2)
- Data as of 2026-08-30T08:39:29.467469+00:00.
