{% extends "layout.html" %} {% block extrahead %}{% endblock %} {% block content %}

Build regex you can
actually read.

A fluent, immutable regex builder for Python. Describe the pattern in plain English — get a compiled regex your teammates can actually review. Batteries included.

A live playground, right here

Edit the chain, watch the regex and the matches update instantly — real edify running in your browser.

Builder
Pattern() \
    .start_of_input() \
    .exactly(4).digit() \
    .end_of_input()
Emitted regex
^\d{4}$
Test strings
2024
1999
90210
abcd

The line nobody wants in a review → one anybody can read

what you'd write
^(?:0x)?([A-Fa-f0-9]{4})$
what you'd read
optional().string("0x")
capture().exactly(4).hex_digit()

Everything around the builder

{}

Reads like English

Quantifiers before the token, like a sentence. Every step returns a fresh builder — nothing mutates.

exactly(4).digit()

228 validators, ready to call

email, URL, semver, IBAN, phone, postal — and 200+ more. Import one, call it, get a bool.

email("a@b.com") → True

See what you built

Render any pattern as an ASCII or graph diagram, a plain-English explanation, or portable JSON.

# START ─▸ \d{4} ▸ END

Fits your stack

First-class pydantic, FastAPI, and Django support, shipped as opt-in extras.

pip install edify[pydantic]
{% endblock %}