Regex tester and replacer

Test regular expressions, inspect matches, and preview replacements against real text.

Test text

Paste the text you want to search, inspect, and rewrite.

Pattern

Adjust the expression, replacement, and flags in one place.

Use $1 for capturing groups and $<name> for named groups.

Flags

Flags change how the pattern scans your text.

Summary

Count matches, captures, and zero-length results at a glance.

Add both a pattern and some text to see regex output.

Results

Switch between the highlight preview, raw matches, and replacement output.

Results

Add both a pattern and some text to see regex output.

Test patterns before using them

Regex is easy to get almost right. This tool gives you one place to validate a pattern, see every match, and confirm the replacement output before you use it in code, content pipelines, or search rules.

What you can check

  • Paste sample text and watch matches update immediately
  • Toggle common flags like global, multiline, and ignore case
  • Inspect capturing groups and named groups for every match
  • Preview replacement output with $1 and $<name> references

When to use it

  • Cleaning IDs, log lines, and exports before import
  • Testing content rewrite rules without touching source data
  • Debugging why a pattern matches too much, too little, or nothing at all

How to use

Enter test text, a regular expression, replacement text, and flags; matches update automatically. Switch between preview, match details, and replacement output, then copy or download the current result.