v1.0 — MIT Licensed

Regex you can
actually read.

A declarative regex query builder for your terminal. Write patterns like you think about them — composable, left-to-right, zero dependencies.

regexq
# Instead of writing:
# ^(?P<user>\w+)@(?P<domain>\w+)\.[a-zA-Z]{2,}$
# Write this:
$ regexq start named:user word end_named \ literal '@' named:domain word end_named \ literal '.' letters end
^(?P<user>\w+)@(?P<domain>\w+)\.[a-zA-Z]+$

Features

Built for developers who hate debugging regex

Every design decision optimizes for clarity and composability.

Blazingly Fast

Single Python file, zero dependencies. Instant regex generation with no startup cost.

Composable

Operations chain left to right, just like regex reads. Build complex patterns from simple parts.

Deterministic

Same input always produces the same regex. No AI, no guessing, no magic.

Zero Dependencies

Only Python 3.10+ standard library. Nothing to install, nothing to break.

Test Mode

Validate patterns against sample strings with --test. See matches and misses instantly.

Unix-Friendly

Outputs to stdout. Pipe to grep, sed, awk, or your clipboard. Fits any workflow.

Examples

See it in action

From simple validations to complex log parsing.

regexq
# Validate an email address
$ regexq start email end
^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$

Reference

Full operations table

Every operation maps to a clear regex concept.

OperationOutput
start^
end$
boundary\b

Installation

Up and running in seconds

Single file, zero dependencies. Just Python 3.10+.

1

Quick Install (Recommended)

$ git clone https://github.com/astroteam-ir/regexq.git
$ cd regexq
$ ./install.sh

The installer checks your Python version (requires 3.10+), installs regexq to /usr/local/bin or ~/.local/bin, and configures your PATH if needed.

2

Manual Installation

# Clone and make executable
$ git clone https://github.com/astroteam-ir/regexq.git
$ cd regexq && chmod +x regexq.py
# Option A: Symlink into PATH
$ ln -s "$(pwd)/regexq.py" /usr/local/bin/regexq
# Option B: Copy to local bin
$ cp regexq.py ~/.local/bin/regexq
# Option C: Alias it
$ echo 'alias regexq="python3 /path/to/regexq.py"' >> ~/.bashrc

Open Source

Stop decoding regex.
Start writing it.

RegexQ is free, open source, and ready for your workflow. Star it, fork it, or just start using it.