Skip to content
CAI
Software that uses CAICheck a score

pemistahl/grex

60.8

Adequate · 29 September 2026

4k

lines of production code

Rust

primary language

2

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Grex is a Rust-based library and command-line tool that automatically generates Perl-compatible regular expressions from a set of test strings. It provides a configurable API to customize character classes, repetitions, and case sensitivity, with support for verbose output and syntax highlighting. The system is distributed as a native Python extension module and a WebAssembly component, ensuring cross-platform availability for regex generation tasks.

Features

Initial release of grex: automated regex generation from test cases

The library and command-line tool grex is introduced, allowing users to generate Perl-compatible regular expressions from a set of provided test strings. The core API is built around the \RegExpBuilder\, which accepts test cases via direct input or a file, and offers configuration options to customize the output. Users can enable features such as converting digits, words, and whitespace to character classes (\\\d\, \\\w\, \\\s\), detecting and converting repeated substrings into quantifiers, enabling case-insensitive matching, and switching between capturing and non-capturing groups. The tool also supports verbose output formatting and colorized syntax highlighting for the generated expressions.

src · high confidence

Python bindings and type stubs for grex

The library is now available as a Python extension module, allowing users to generate regular expressions from test cases directly within Python software. This release adds the \grex.pyi\ type stub file for improved IDE support and static analysis, and introduces the \RegExpBuilder\ class with methods for configuring character classes, repetitions, anchors, and case sensitivity. The Python package requires Python 3.12 or newer.

(repo-wide) · high confidence

Behavioural changes

Updated Unicode tables to version 16.0.0

The internal Unicode data tables for decimal numbers, whitespace, and word characters have been regenerated and updated to align with Unicode 16.0.0. This ensures that character classification and parsing logic reflects the latest standard definitions.

_src/unicode\tables · high confidence

Test coverage

Added benchmark suite for regex generation performance; Added comprehensive test suites for CLI, library, and WASM targets; Added tests for the Python RegExpBuilder extension module.

Dependencies

Update Rust dependencies and lockfile for grex 1.4.6

The project's dependency manifest (Cargo.toml) and lockfile (Cargo.lock) have been updated to their latest versions. Key upgrades include clap to 4.5.53, regex to 1.12.2, itertools to 0.14.0, ndarray to 0.17.1, and pyo3 to 0.27.1. The Python build toolchain has also been updated, with maturin set to 1.10.1 and pytest to 9.0.1 in the respective configuration files.

(dependencies) · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 62 → 61 (-1.6)
  • Rubric changed (rubric-2026.09.9 → rubric-2026.09.17) — scores are not directly comparable.

Lenses

  • Code Health 92 → 92 (+0.0)
  • Architecture 100 → 99 (-0.6)
  • Maturity 52 → 52 (+0.0)
  • Readiness 79 → 57 (-22.0)
  • Security 54 → 70 (+15.2)

Resolved (2)

  • Documentation: no installation or build instructions (README.md)
  • Documentation: no usage examples (README.md)

New (7)

  • Flaky test: grex::property_tests.matching_regexes_with_case_insensitive_matching_and_verbose_mode
  • Inverted test pyramid
  • Outdated: clap
  • Outdated: ndarray
  • Outdated: regex
  • Outdated: unicode-segmentation
  • Outdated: wasm-bindgen

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

pemistahl/grex was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 29 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 99cc347707375e00514f938b76d885a201dfc110 — the exact code this score is about.
  • Scored under rubric-2026.09.17 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-705631bb727e.