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.
- Established community: 8,311 GitHub stars
- Downloads come straight from the project's own GitHub releases
- Around since 2019
Things to watch:
- Weak automated security checks (OpenSSF Scorecard 2.5/10)
- No checksums or signatures published: you can't verify the download
8,311 GitHub stars · 96k downloads · 10 contributors · OpenSSF Scorecard 2.5/10.
Download Grex
- grex-v1.4.6-aarch64-apple-darwin.tar.gz (macOS, 1.1 MB)
- grex-v1.4.6-aarch64-pc-windows-msvc.zip (Windows, 929 KB)
- grex-v1.4.6-aarch64-unknown-linux-musl.tar.gz (Linux, 1.2 MB)
- grex-v1.4.6-x86_64-apple-darwin.tar.gz (macOS, 1.2 MB)
- grex-v1.4.6-x86_64-pc-windows-msvc.zip (Windows, 1006 KB)
- grex-v1.4.6-x86_64-unknown-linux-musl.tar.gz (Linux, 1.3 MB)
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
- Ripgrep: ripgrep recursively searches directories for a regex pattern while respecting your gitignore (High trust, 76/100)
- Q: q - Run SQL directly on delimited files and multi-file sqlite databases (Use caution, 52/100)
- fd: A simple, fast and user-friendly alternative to 'find' (High trust, 78/100)
- JC: CLI tool and python library that converts the output of popular command-line tools, file-types, and common strings to JSON, YAML, or Diction (Good, 69/100)
- App Store Connect CLI: Fast, scriptable CLI for the App Store Connect API. Automate TestFlight, builds, submissions, signing, analytics, screenshots, subscriptions (Good, 66/100)
- JiraCLI: 🔥 Feature-rich interactive Jira command line. (Good, 63/100)
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).