Skip to content
Zesona
Regex TesterLocal

Regex Tester

Test a regular expression against a subject, with every match, its position, and its numbered and named capture groups.

  • Free
  • No sign-up
  • Runs in your browser

Input

Runs in your browser

JavaScript regular expression syntax, without the surrounding slashes.

0 characters

Processed entirely in your browser. Nothing is uploaded.

s dot matches newline, u unicode mode. The g flag is always applied.

Try an example

Fill in Pattern and Test string to continue.

Enter your input to see the result

Everything happens on this device. No upload, no account, no network request.

How to use this tool

  1. 1

    Enter a pattern and the text to search.

  2. 2

    Every match is listed with its position and capture groups, so you can see exactly what the pattern is doing.

  3. 3

    A pattern that could match the empty string is refused with an explanation, because it would match at every position.

Questions about Regex Tester

Which regex flavour is this?

The JavaScript engine built into your browser - the same one your code will run. It supports lookahead, lookbehind, named groups and Unicode property escapes, but it is not PCRE: no recursion, no atomic groups, no possessive quantifiers. A pattern copied from a Perl or PHP answer may need adjusting.

What is catastrophic backtracking, and will you warn me?

Nested quantifiers such as `(a+)+b` can take exponential time on a subject that nearly matches - a real denial-of-service vector if the pattern runs on user input. The tool warns when it spots that shape, and caps the match count. It cannot detect every case: deciding whether a pattern is pathological is undecidable in general.

Is my data sent anywhere?

No. This tool runs as JavaScript inside your browser tab. There is no network request carrying your input, nothing is written to a server log, and it keeps working with your connection switched off. You can confirm it in the browser’s network panel. That matters more here than elsewhere on the site: developer tools handle tokens, keys and production data.

Does the Regex Tester work offline?

Yes. Once the page has loaded it runs entirely as JavaScript on your own device, so the Regex Tester keeps working with the network switched off and nothing is ever sent to a server.

Is anything I enter into the Regex Tester uploaded or stored?

No. The Regex Tester runs in your browser, so whatever you type or paste never leaves your device — there is no server round-trip, nothing is logged, and there is nothing to delete afterwards.

Other tools you might reach for next.