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. Clone the repo

$ git clone https://github.com/ariadev/regexq.git
$ cd regexq

2. Make it executable

$ chmod +x regexq.py

3. Add to PATH

# Option A: Symlink
$ ln -s "$(pwd)/regexq.py" /usr/local/bin/regexq
# Option B: Alias
$ 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.