# pemistahl/grex

A command-line tool and Rust library with Python bindings for generating regular expressions from user-provided test cases

Repository: https://github.com/pemistahl/grex
Canonical: https://ross.abutalabs.com/products/grex
Homepage: https://pemistahl.github.io/grex-js/
Language: Rust
License: Apache-2.0
License Family: permissive
Topics: command-line-tool, tool, regex, regexp, regex-pattern, regular-expression, regular-expressions, rust, cli, rust-cli, terminal, rust-library, rust-crate, python, python-library
Last push: 2026-02-27T17:22:36+00:00

## Health v2 (maintenance only)
Score: 59/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 69, release rhythm 24, longevity 100
- inputs: {"age_days": 2524, "days_push": 187, "days_rel": 292, "gap_med": null, "n_releases_24m": 1}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 8173, forks 197 (observed 2026-08-28T04:10:14.041486+00:00)

## What it is
grex is a command-line tool and Rust library (with Python bindings) that automatically generates regular expressions from user-provided test case strings. It simplifies writing regex patterns by inferring them from examples.

## Use cases
- generate a regex from example strings
- infer regular expression from test cases
- simplify writing regex patterns
- convert sample strings into a regex
- learn regex by examples
- automate regex creation from input samples

## When to choose
- you have example strings and need a matching regex quickly
- you want a CLI or Rust/Python library for regex synthesis
- you struggle with writing complex regex patterns manually

## When to avoid
- you need a regex debugger or visual regex tester
- you need regexes optimized for specific regex engines' syntax beyond common features
- you need to extract regexes from arbitrary text without examples

## Facets
- artifact type: cli-tool
- maturity: active
- function: parser, developer-tools, cli
- domain: developer-tools, parsers
- platform: windows, rust, python, cli, cross-platform
- tags: regex-generation, regular-expressions, rust-library, python-bindings, test-cases, command-line, linux, macos

## Member repositories
- pemistahl/grex (main) score 59

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:10:14.041486+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-29T17:29:35.317825+00:00, confidence not recorded.
  - readme: https://github.com/pemistahl/grex (fetched 2026-08-28T04:10:14.041486+00:00, sha ba39d35eba2a)
  - homepage: https://pemistahl.github.io/grex-js/ (fetched 2026-08-29T08:28:19.000998+00:00, sha 93c9f9cd00c4)
  - registry_crates: https://crates.io/api/v1/crates/grex (fetched 2026-08-29T08:28:19.010180+00:00, sha 53eeaa8268eb)
- Data as of 2026-08-30T08:39:29.467469+00:00.
