Visual regex builder

Stack blocks instead of typing symbols. Pick a block, set how many times it repeats, drag to reorder — the pattern and its matches update as you go.

Start from:
Add a block

New blocks go after the selected one.

Your pattern, block by block13 blocks · drag or use arrows
/^(?<year>\d{4})-(?<month>\d{2})-(?<day>\d{2})$/

Live test

How the blocks map to regex

Every block is one atom — a literal, a character class or an anchor — plus an optional quantifier that says how many times it repeats. Exact text is escaped automatically, so a dot you type means a real dot, not "any character". Groups bracket several blocks so a quantifier or an OR applies to all of them; lookaheads check what comes next without consuming it.

Once you know which block produces which symbol, the cheat sheet is quicker, and How regex works shows what the engine does with your blocks step by step.

Questions

What is a visual regex builder?

A tool that lets you assemble a regular expression from labelled blocks — "digit, exactly 4 times", "one of - or /" — instead of typing symbols. RegexKit escapes literal text for you and shows the resulting pattern and its matches live.

Can I edit the generated pattern by hand?

Yes. Copy it, or press "Open in tester" to continue in the full regex tester, where you can type freely.

How do I make a group optional?

Add "Group (", the blocks inside it, then ") End group" — select the closing block and set its repetition to "optional". The quantifier on a closing block applies to the whole group.

Why is my pattern marked invalid?

Usually an unbalanced group: every "Group (" needs a matching ") End group". Lookbehind groups also need a modern browser.