VibeHunt
Back to browse

grex

Generate regular expressions from user-provided test cases.

Grex is a library and command‑line utility that builds a regular expression from a set of example strings supplied by the user. It analyzes the provided test cases and produces a single Perl‑compatible pattern that matches exactly those inputs, ensuring no unintended matches by default. The tool can be invoked from the terminal or used programmatically, and it supports flags or preprocessing steps that allow the generated expression to be generalized when needed.

The primary audience consists of developers who need to create or validate regular expressions quickly without hand‑crafting them, especially when dealing with complex or repetitive patterns. By automating the creation process, grex reduces the manual effort and potential errors associated with writing regexes from scratch.

Grex is implemented in Rust, offering a stable, fast command‑line experience across Linux, macOS, and Windows. It extends the functionality of the earlier JavaScript project regexgen, delivering compatible same core capabilities while adding new features and improvements. The generated patterns are compatible with Rust’s regex crate and other PCRE‑based parsers.

Reviews

Sign in to leave a review.

Loading reviews…

Similar apps