Skip to content

Regex Playground

Developer Tool

Test, debug, and inspect regular expressions instantly with smart match detection and replacement preview.

Exact Matches
Match Details
 
Replace Preview
Replacement results will appear here
Total Matches 0
Status Ready

  • Test regular expressions against any text input
  • Highlight matching results instantly
  • View match details, indexes, and capture groups
  • Replace matched text with custom replacements
  • Support for JavaScript regex flags (g, i, m, s, u)
  • Copy matched results with one click
  • Runs entirely in your browser with no data sent to a server

  1. Enter a regular expression in the Regex Pattern field.
  2. Paste or type the text you want to test.
  3. Select the regex flags you need.
  4. Click Run Regex to view matching results.
  5. (Optional) Enter replacement text and click Replace to preview the updated text.

  • g – Find all matches.
  • i – Ignore letter casing.
  • m – Match each line separately using ^ and $.
  • s – Allow . to match newlines.
  • u – Enable Unicode-aware matching.

Most common combinations:

  • g – Find every match.
  • g i – Find every match, ignoring case.
  • g m – Search across multiple lines.

  • Validate email addresses, phone numbers, URLs, and dates
  • Extract IDs, numbers, hashtags, or other text patterns
  • Test and debug JavaScript regular expressions
  • Preview text replacements before applying them
  • Learn how regex patterns and flags affect matching