grex

CLI

Generate regular expressions from test cases.

Auto-generate regex patterns from example strings

2 curated recipes · not yet executed by the harness#regex#generate#pattern

Recipes

Curated from documentation and usage. Percentages are estimates, not measurements.

Generate regex from examples

~95% est.
grex foo1 foo2 foo3

Generate digit-aware regex

~93% est.
grex --digits foo1 foo2

Install

Homebrewbrew install grex
Cargocargo install grex

Agent notes

When to use
Creating regex patterns from input examples
Quick examples
  • grex foo bar baz
  • echo -e 'test1\ntest2' | grex

Use from an agent

curl -s https://clihub.com/api/tools/grex | jq '.agentHints.provenRecipes[] | {task, command, verified}'

Or call get_tool with slug grex on the MCP server at https://clihub.com/mcp.

Homepage ↗Apache-2.00 views