← All tools

Regex Builder and Explain

Build a real ECMAScript pattern, inspect its syntax tree and test locally in a cancellable Worker.

regex-builderLOCAL WORKSPACE

Enabling local controls…

Anchors
Character union

Classes form a union. A raw fragment supplies a grouped atom when no class is selected; otherwise it follows the quantified class. OR comes before the outer wrapper and anchors.

Flags

Pattern and syntax report

Build or explain a pattern to see native syntax and match tables. No pasted HTML is rendered.

Model and limits

ECMAScript gim flags. Classes form a union; dot must stand alone. A raw fragment is grouped when it supplies the atom, otherwise appended after the quantified class; OR is grouped before the chosen wrapper and outer anchors. Templates are scoped examples, not complete validators. Static AST hints cannot prove safety or runtime complexity; matching has a 1s Worker deadline, startup10s, pattern4000/text100000 UTF-16 units,250 matches/250 explanation rows and1MiB complete export. Editing cancels and clears stale results; no network or input execution beyond the requested regex match.

ECMAScript regular expressions ↗regexpp parser ↗ToolHubEN inspected controls ↗

How to use this tool

Choose a character union and one quantifier, add grouping/anchors or a raw fragment, then build and test. Templates and searchable syntax notes are available; Explain accepts an edited pattern.

When not to use it

ECMAScript gim flags. Classes form a union; dot must stand alone. A raw fragment is grouped when it supplies the atom, otherwise appended after the quantified class; OR is grouped before the chosen wrapper and outer anchors. Templates are scoped examples, not complete validators. Static AST hints cannot prove safety or runtime complexity; matching has a 1s Worker deadline, startup10s, pattern4000/text100000 UTF-16 units,250 matches/250 explanation rows and1MiB complete export. Editing cancels and clears stale results; no network or input execution beyond the requested regex match.