Skip to content
Developer Tools/

Regex Tester

Type a pattern or pick a preset — matching runs in a worker, so runaway patterns can't freeze the tab.
Matches highlighted
Matches will appear here…
  1. [a-zA-Z0-9._%+-]any one of: a to z, A to Z, 0 to 9, any of "._%+-"
  2. +one or more times
  3. @the character "@"
  4. [a-zA-Z0-9.-]any one of: a to z, A to Z, 0 to 9, any of ".-"
  5. +one or more times
  6. \.a literal "."
  7. [a-zA-Z]any one of: a to z, A to Z
  8. {2,}2 or more times
$& whole match · $1…$9 numbered group · $<name> named group · $$ literal $
Replace preview
Preview appears once the pattern runs…

About Regex Tester

Test regular expressions with live match highlighting, a token-by-token explanation of your pattern, and notes on how it behaves in other languages.

What it does

Type a pattern and see matches highlighted in your test text as you go, with capture groups broken out. The explanation panel walks the pattern token by token in plain English, which is the fastest way to find the piece that is not doing what you assumed.

Runaway patterns can't freeze the page

Some patterns — typically nested quantifiers against a non-matching string — take exponential time, a failure mode known as catastrophic backtracking. It is the mechanism behind real denial-of-service incidents in production systems. Matching here runs in a separate Web Worker with a kill timer, so a pathological pattern is terminated and reported rather than locking up your browser tab.

Portability

Regex dialects differ in ways that bite when you move a pattern between languages: lookbehind is unsupported in older engines, named-group syntax varies, and JavaScript needs the u flag for proper Unicode handling. The tool flags constructs that will not travel.

Common questions

What is catastrophic backtracking?
A pattern whose matching time grows exponentially with input length, usually from nested quantifiers such as (a+)+. It can hang a server, which is why matching here is sandboxed with a timeout.
Which flavour of regex is this?
JavaScript's, since it runs in your browser. Constructs that behave differently in PCRE, Python or Go are called out.
Why doesn't my pattern match accented characters?
Character classes like \w are ASCII-only by default. Use the u flag with Unicode property escapes such as \p{L} for letters in any script.
Is my test data sent anywhere?
No. Everything happens in your browser — nothing you enter is uploaded, and the tool keeps working with no network connection.

Related tools