Regex Tester

Write a regular expression and test it against your input string in real time. All matches are highlighted, and capture groups are displayed clearly.

How to Use the Regex Tester

  1. Type your regular expression pattern in the pattern field (no surrounding slashes needed).
  2. Toggle the flags you need: g (global — all matches), i (case-insensitive), m (multiline), s (dot-all), u (unicode), d (capture group indices).
  3. Paste or type your test string in the large textarea. All matches are highlighted in the Match Preview in real time.
  4. The Matches panel lists every match with its index position and any numbered or named capture groups.
  5. The Pattern Explanation panel breaks down each token in your regex into plain English — useful for understanding or debugging complex expressions.
  6. If your pattern is invalid, a clear error message appears below the pattern field explaining the problem.
  7. Use Copy Regex to copy the pattern in /pattern/flags format. Use Clear to reset everything.

About This Tool

This regex tester works as a regular expression debugger, regex validator, regex playground, and live regex checker. Write your pattern, select flags (global, case-insensitive, multiline, dotAll, unicode, sticky), and instantly see every match highlighted in your test string along with capture group details.

Supports JavaScript regular expression syntax — ideal for testing patterns for form validation, URL parsing, log file analysis, string extraction, and search-and-replace operations. Use it as a regex cheat sheet companion or quick regex verifier before committing code.