Skip to content
Dozo Tools

JavaScript regex builder

If you cannot write the expression, pick pieces here. It runs in your browser with JavaScript only. The pattern is not uploaded. Use the tester to run matches.

Build a pattern

Pick pieces in order. JavaScript only. Nothing is uploaded.

Test this pattern on the JavaScript regex tester.

This page writes a JavaScript regular expression. It is not PCRE2. The pieces stay in your browser.

Questions

What if I cannot write the expression?

You pick pieces — text, a digit, a group, and the rest of the list on this page — and the page writes the JavaScript pattern.

Which pieces can I use?

Text, any character, a digit, a word character, whitespace, exactly these characters, a group, or, start, and end. Quantifiers are one, optional, one or more, zero or more, an exact count, or a range.

Can I test the pattern here?

No. Copy it, or use the link to the JavaScript regex tester. This page does not run matches.

Is this PCRE2?

No. The builder writes a JavaScript regular expression. It is not PCRE2.