Regex Playground

Test regular expressions against custom text with live highlighting and replacement.

How to Use This Tool

  • Write your regex: Enter your expression in the first input box. Do not wrap it in forward slashes.
  • Add flags: Use the small box next to it to add Javascript flags like g (global), i (case-insensitive), or m (multiline).
  • Test String: Paste the text you want to search through in the large textarea. Matches will be highlighted in yellow in real-time.
  • Replacement (Optional): If you want to preview a .replace() operation, type a replacement string (using capture groups like $1, $2 if needed). The result appears instantly at the bottom!
/ /
0 matches found.