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 Explore our comprehensive directory of recommended free and open source software. Our carefully curated collection spans every major software category.

This directory is part of our ongoing series of informative articles for Linux enthusiasts. It features hundreds of detailed reviews, along with open source alternatives to proprietary solutions from major corporations such as Google, Microsoft, Apple, Adobe, IBM, Cisco, Oracle, and Autodesk.

You’ll also find interesting projects to try, hardware coverage, free programming books and tutorials, and much more.

Discovered a useful open source Linux program that we haven’t covered yet? Let us know by completing this form.
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments