Skip to content
Work data is processed in your browser, not stored on our servers.
tools
Regex Tester with Match and Replace Preview

Regex Tester with Match and Replace Preview

Test JavaScript regular expressions with match positions, capture groups, highlighting, and replacement output.

//gi
0 matches
Contact: hello@example.com Admin: admin@test.co.kr Phone: 010-1234-5678

No matches found.

Key features

  • Combines the g, i, m, s, u, and y JavaScript regex flags.
  • Lists every match index plus positional and named capture groups.
  • Highlights matches in the test text and previews $1 or $<name> replacements.
  • Includes quick patterns for email, URLs, numbers, phone numbers, and more.

How to use

  1. Enter a pattern and choose flags.
  2. Inspect matches and captures in the test text.
  3. Open replacement preview when you need to test substitution output.

Examples

  • Debug an extraction pattern

    Inspect every match position and capture group against sample text.

  • Validate a replacement expression

    Preview regex replacement output before applying the logic to real data.

Privacy

Regex execution, highlighting, and replacement previews run in your browser; the pattern, flags, and test text are kept in that browser's local storage.

Requirements

Risky patterns are rejected, with limits of 1,000 pattern characters and 100,000 input characters.

Common questions

Which regex syntax and flags are used?
It uses JavaScript regular-expression syntax with combinations of g, i, m, s, u, and y flags.
Can I inspect capture groups and replacements?
Yes. Numbered and named captures are listed per match, with a preview for $1 or $<name> replacements.