Rechner Welt
Developer

Regex Tester

Test JavaScript regular expressions against sample text โ€” live match highlighting, capture groups, replace preview.

Last updated: April 2026 ยท Runs in your browser ยท No sign-up

Quick answer: Enter a pattern and test string. Matches highlight in real time; capture groups appear in a sidebar.
Kontakt: max@example.com und erna@test.de
2 Treffer
  • [9] max@example.com โ€” Gruppen: max, example.com
  • [29] erna@test.de โ€” Gruppen: erna, test.de

Regex cheat sheet

  • \d digit, \w word char, \s whitespace
  • + one or more, * zero or more, ? optional
  • ^ line start, $ line end, \b word boundary
  • [abc] character class, [^abc] negated
  • (a|b) alternation, (?=a) positive lookahead

Performance caveat

Nested quantifiers like (a+)+ on adversarial input can cause catastrophic backtracking (ReDoS). Keep patterns tight and test against worst-case inputs.

Frequently Asked Questions

Which regex flavour does it use?

JavaScript (ECMAScript) regex. That's nearly a superset of PCRE but with small differences โ€” notably no possessive quantifiers and no (?P<name>...) Python-style named groups (use (?<name>...) instead).

What flags are supported?

g (global), i (case-insensitive), m (multiline ^$ anchors), s (dotAll โ€” . matches newlines), u (Unicode), y (sticky). Combine as needed.

How do capture groups work?

Parentheses capture. (\w+) grabs a word. Use ?: for non-capturing groups: (?:abc). Named groups: (?<year>\d{4}). Backreferences: \1 or \k<year>.

Can I see what a replace does?

Yes. The replace pane shows the output of .replace(pattern, replacement), with $1, $2 etc. referring to capture groups.

Related Tools