PureKit

Regex Tester

Test and debug regular expressions with live matching

All processing happens in your browser. Your data never leaves your device.
//g

Features

  • Real-time regex matching with instant visual feedback
  • Support for all JavaScript regex flags (g, i, m, s, u, d)
  • View capture groups and named groups for each match
  • Test replacement patterns with $1, $2 syntax
  • All processing in browser — your test data stays private

How to Use the Regex Tester

  1. 1Enter your regular expression pattern in the pattern field
  2. 2Select regex flags (g for global, i for case-insensitive, etc.)
  3. 3Type or paste your test string in the text area
  4. 4View matches highlighted in real-time with capture group details

Frequently Asked Questions

Which regex flavor does this use?

This tool uses JavaScript's built-in RegExp engine, which supports ECMAScript regex syntax. This includes features like lookbehind assertions, named capture groups, Unicode property escapes, and the dotAll (s) flag.

Can I use replacement patterns?

Yes. Enter a replacement pattern using $1, $2 for capture group references, $& for the full match, $` for text before the match, and $' for text after. Named groups can be referenced with $<name>.

How do I match across multiple lines?

Use the 'm' (multiline) flag to make ^ and $ match the start and end of each line. Use the 's' (dotAll) flag to make '.' match newline characters as well.

Related Tools