regexplain
Share on:
Enter Your Mastodon Instance
Copy the link below to share to Mastodon
https://terminaltrove.com/regexplain/
A TUI for explaining and visualizing regular expressions, a regex101 for your shell.
Script Preview
Review this script before executing in your terminal.

regexplain is a TUI and CLI for explaining and visualizing regular expressions, modelled loosely on regex101 in the terminal.
It parses a pattern into a simplified syntax tree, then generates a plain-language description of each part and colorizes the pattern to match the breakdown, testing it against text you type or a file you point it at. It can be used as a CLI for quick one-off checks and has a restore flag that brings back your previous session.
This tool also has emacs-style key bindings for moving and editing, a description tree you navigate with vim key-bindings or arrows, and you can clipboard copy the pattern when the input is focused.
regexplain fits anyone who regularly writes regex, from developers debugging a complex regex pattern, to students learning what each token does in the terminal.

