Developer Tools

Grex

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

By pemistahl. Free and open source for Windows, macOS, Linux. Latest version v1.4.6, released 2025-11-14.

Is Grex safe?

Trust score 46/100: Use caution. Some warning signs. Read the notes, check the reviews, and verify the file before you run it.

Things to watch:

8,311 GitHub stars · 96k downloads · 10 contributors · OpenSSF Scorecard 2.5/10.

Download Grex

Downloads come straight from github.com/pemistahl/grex.

About Grex

complicated and tedious task of creating regular expressions. It does so by automatically generating a single regular expression from user-provided test cases. The resulting expression is guaranteed to match the test cases which it was generated from.

This project has started as a Rust port of the JavaScript tool

Devon Govett. Although a lot of further useful features could be added to it, its development was apparently ceased several years ago. The plan is now to add these new features to grex as Rust really shines when it comes to command-line tools. grex offers all features that regexgen provides, and more.

The philosophy of this project is to generate the most specific regular expression possible by default which exactly matches the given input only and nothing else. With the use of command-line flags (in the CLI tool) or preprocessing methods (in the library), more generalized expressions can be created.

Similar apps

Questions

Is Grex safe to download?

Grex has an OpenShelf trust score of 46/100 (Use caution). Some warning signs. Read the notes, check the reviews, and verify the file before you run it. Main thing to watch: Weak automated security checks (OpenSSF Scorecard 2.5/10).

Is Grex free?

Yes. Grex is free and open source under the Apache-2.0 license. The source code is public at github.com/pemistahl/grex.

Does Grex work on Windows, macOS and Linux?

Grex is available for Windows, macOS, Linux. Ready-made downloads exist for Windows, macOS, Linux.

How do I install Grex?

Download the official file from the project's GitHub releases (for example grex-v1.4.6-aarch64-apple-darwin.tar.gz) and run it.

What are alternatives to Grex?

Similar open-source apps: Ripgrep (trust 76/100), Q (trust 52/100), fd (trust 78/100), JC (trust 69/100).