01 / WRITE
Say what you need.
One instruction per line. Start with 3 digits, a literal like "ABC", or a recipe.
LITTLE RULES. BIG AHA MOMENTS.
Write a few clear rules. Get a JavaScript regex you can read, explain, and put to the test.
start "#"
6 hex digits
end/^#[0-9A-Fa-f]{6}$/u#12aBcFร #123Demo 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 โFROM โHUH?โ TO โGOT IT.โ
01 / WRITE
One instruction per line. Start with 3 digits, a literal like "ABC", or a recipe.
02 / UNDERSTAND
Follow each rule to its regex fragment and explanation. No mystery pattern to blindly trust.
03 / TEST
Try strings that should match and strings that shouldn't. Change a rule. See what happens.
PICK A STARTING POINT
Nine editable recipes in the workshop.
Bring your own examples, too.
ABC123A prefix + exactly three digits.
INV-1234INV- + 2โ6 digits. Verify records separately.
Alice_73โ16 characters; ASCII letter first.
#12aBcFSix hexadecimal digits after #.
2026-09-30YYYY-MM-DD. Calendar checks are separate.
09:30HH:MM. Check hour and minute ranges separately.
1.2.3Three numeric parts. Not full SemVer.
text without: a, bChoose which characters to exclude.
item 123A line ending in at least three digits.
YOUR NEW REGEX SANDBOX
Live output, explanations, helpful error positions, and examples you can edit. All in your browser.
Take it for a spinRules and examples stay in your browser.
THE POCKET CHEAT SHEET
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"helloone of: a, b[ab]text without: a, b[^ab]*any text.*