LITTLE RULES. BIG AHA MOMENTS.

Regex, with
a human side.

Write a few clear rules. Get a JavaScript regex you can read, explain, and put to the test.

Fixed vocabulary Runs locally No account

Words in. Regex out.

TRY IT โ†“
Demo recipes
01 / THE HUMAN BIT
start "#"
6 hex digits
end
02 / THE REGEX BIT
/^#[0-9A-Fa-f]{6}$/u
โœ“ #12aBcFร— #123
Not checked

Demo limit: 80 UTF-16 code units. Longer input is kept but cannot be tested. The workshop accepts up to 2,048.

Six hex digits after #, in either letter case. Only #RRGGBB; no shorthand, alpha or other CSS color forms.

Edit this in the workshop โ†—
Readable rules Real JavaScript regex Explain every fragment Test the edge cases

FROM โ€œHUH?โ€ TO โ€œGOT IT.โ€

Three steps. One happy brain.

01 / WRITE

Say what you need.

One instruction per line. Start with 3 digits, a literal like "ABC", or a recipe.

02 / UNDERSTAND

See every little bit.

Follow each rule to its regex fragment and explanation. No mystery pattern to blindly trust.

03 / TEST

Give it a reality check.

Try strings that should match and strings that shouldn't. Change a rule. See what happens.

PICK A STARTING POINT

Small recipes.
Useful little superpowers.

Nine editable recipes in the workshop.
Bring your own examples, too.

YOUR NEW REGEX SANDBOX

Poke it.
Break it.
Understand it.

Live output, explanations, helpful error positions, and examples you can edit. All in your browser.

Take it for a spin

Rules and examples stay in your browser.

Regex For Humans workshop with editable rules, a generated regex, explanations, and passing examples.

THE POCKET CHEAT SHEET

A few words.
A lot less squinting.

A small, fixed English vocabulary. Every supported instruction has an exact meaning.

Read the full syntax guide โ†—

JavaScript RegExp only. Free-form English, raw regex, groups, alternation, and lookaround aren't part of this language.

start / end^ / $
3 digits\d{3}
between 2 and 6 digits\d{2,6}
letters[A-Za-z]+
6 hex digits[0-9A-Fa-f]{6}
"hello"hello
one of: a, b[ab]
text without: a, b[^ab]*
any text.*

Make your next regex
a little more human.

Let's make a match