FREE · DEVELOPER TOOL

Regex Tester & Debugger

Test regular expressions against sample text, inspect matches and capture groups, and preview replacements. Processing happens locally in your browser.

Enter the pattern without surrounding slash marks. Example: \b\d{4}\b
Ready to test your pattern.

Highlighted text

Matched portions are highlighted below. If there are no matches, the original text is shown.

Your highlighted results will appear here.

Match details

Run a test to see match count and positions.

#Full matchIndexCapture groups
No results yet.

Replacement preview

Use JavaScript replacement syntax such as $& (full match), $1 (capture group), or $$ (literal dollar sign).

Replacement preview will appear here.

How to use the Regex Tester

  1. Enter a regular expression pattern without the surrounding slash marks.
  2. Choose flags such as global, ignore case, multiline, or dot-all.
  3. Paste sample text and select Test Regex.
  4. Review highlighted matches, zero-based character positions and capture groups.
  5. Enter replacement text to preview the transformed result.

Note: This tool uses JavaScript regular-expression syntax. It checks text patterns; it does not guarantee that matched data (such as an email address) is valid in the real world. Avoid untrusted, extremely complex patterns that may run slowly.