A simple cookie-builder-style regex builder that lets you assemble regular expressions from blocks, preview the result, and test it live.
Open index.html in your browser.
From the repo root run:
python -m http.server 4173Then open:
- Start the server:
python -m http.server 4173
- Open http://localhost:4173
- Try this example:
- Click Start (^)
- Click Word character (\w) and set quantifier to 1 or more (+)
- Click Digit (\d) and set quantifier to between 2 and 5 ({2,5})
- Click End ($)
- In the tester, paste:
user12 user12345 test99
Validate JavaScript syntax:
node --check app.jsi(ignore case): letters are matched case-insensitively (catalso matchesCat).m(multiline):^and$work for each line, not only start/end of full text.s(dotall):.can also match newline characters (\n).g(global): find all matches instead of stopping at the first one.
Tip: If you're unsure, start with only g enabled and add others only when needed.
- Add blocks from left to right to describe the pattern.
- Set quantifiers in Your blocks (
+,*,?,{2,5}, etc.). - Enable flags in the Preview section if your case needs them.
- Paste sample text into Tester and check how many matches you get.
- Click Copy regex when result looks correct.
- ready-made blocks (
\\d,\\w,\\s,^,$,|,.), - custom blocks: literal, character class, and named group,
- per-block quantifiers,
- reordering blocks,
- regex preview with flags,
- live match tester.