Selection of utilities

rgx – terminal regex tester

rgx is a terminal application for building, testing, and debugging regular expressions.

It provides an interactive text user interface for experimenting with patterns against sample text, viewing matches and capture groups, testing replacements, and comparing behaviour across multiple regex engines. The project is particularly suited to terminal-centric workflows such as remote sessions, shell pipelines, and engine-specific regex testing without leaving the command line.

This is free and open source software.

Key Features

  • Real-time matching – matches update on every keystroke.
  • Syntax-highlighted pattern input – AST-based coloring for groups, quantifiers, character classes, anchors, and escapes.
  • 3 regex engines – Rust regex (default), fancy-regex (lookaround/backrefs), PCRE2 (full features).
  • Capture group highlighting – distinct colors per group, nested group support.
  • Plain-English explanations – walks the regex AST to generate human-readable breakdowns.
  • Replace/substitution mode – live preview with $1, ${name}, $0/$& syntax.
  • Match detail + clipboard – navigate matches/captures with Up/Down, copy with Ctrl+Y.
  • Pattern history + undo – Ctrl+Z/Ctrl+Shift+Z undo/redo, Alt+Up/Down browse history.
  • Context-sensitive cheat sheet – F1 multi-page help: shortcuts, regex syntax, engine-specific features.
  • Whitespace visualization – toggle with Ctrl+W to show spaces as ·, newlines as ↵, tabs as →.
  • Mouse support – click to focus/position cursor, scroll to navigate panels.
  • Engine selector – switch engines with Ctrl+E, see where behavior differs.
  • Regex flags – toggle case-insensitive, multiline, dotall, unicode, extended.
  • Stdin pipe support – echo “test string” | rgx ‘\d+’.
  • Non-interactive batch mode – rgx -p -t “input” ‘pattern’ prints matches to stdout and exits.
  • Pipeline composability – pipe in, filter, pipe out: cat log | rgx -p ‘\d+’ | sort -n.
  • Vim mode – optional modal editing (–vim or vim_mode = true) with Normal/Insert modes, h/j/k/l navigation, w/b/e word motions, dd/cc/x editing, and all global shortcuts preserved.
  • Recipe library – built-in common patterns (email, URL, IP, semver, etc.); Ctrl+R to browse and load.
  • Cross-platform – Linux, macOS, Windows.

Website: github.com/brevity1swos/rgx
Support:
Developer: brevity1swos
License: MIT License

rgx in action
Click animation for full size

rgx is written in Rust. Learn Rust with our recommended free books and free tutorials.


Best Free and Open Source Software LinuxLinks helps you discover the best free and open source software for Linux. Explore our extensive collection of recommended applications, including alternatives to popular proprietary software.

We also publish software reviews, Linux tutorials, hardware reviews, free programming books and articles covering the wider open source community. Browse our Linux resources to discover more.

Know a useful free and open source Linux application we haven't covered? Suggest a program for inclusion.

Has your software been featured on LinuxLinks? Display one of our Featured on LinuxLinks badges on your website or GitHub README.
Subscribe

Please read our Comment Policy before commenting.

Notify of
guest
0 Comments
Oldest
Newest Most Voted