Developer

Free Online Regex Tester

Test regular expressions in real time with match highlighting, capture groups, and a replace mode. Runs entirely in your browser.

Runs entirely in your browser — no data is uploaded.
//g
Enter a pattern and test string

What is Regex Tester?

Regex Tester is a free online tool for testing regular expressions against text in real time. It highlights matches, shows capture groups, and supports find-and-replace — all in your browser.

How to use

  1. Enter a regex pattern in the pattern field
  2. Toggle flags (g, i, m, s, u) as needed
  3. Type or paste your test string
  4. Matches are highlighted instantly in the output panel
  5. Click "Replace" to enable find-and-replace mode with substitution patterns ($1, $2, etc.)

Features

  • Real-time matching — results update as you type
  • Match highlighting — matched text is visually highlighted
  • Capture groups — named and numbered groups shown in match details
  • Replace mode — test substitution patterns with $1, $2, named groups
  • Sample patterns — quick-load patterns for emails, URLs, IPs, and dates
  • Flag toggles — visual buttons for g, i, m, s, u flags

Supported flags

  • g (Global) — find all matches, not just the first
  • i (Case-insensitive) — ignore uppercase/lowercase
  • m (Multiline) — ^ and $ match start/end of each line
  • s (Dotall) — . matches newline characters
  • u (Unicode) — enable full Unicode matching

Limitations

  • Maximum test string: 200,000 characters
  • Maximum pattern length: 10,000 characters
  • Maximum matches displayed: 1,000
  • Uses JavaScript regex engine (PCRE features like lookbehind may vary by browser)
  • Does not support regex flavors from other languages (Python, Java, etc.)

Cookies for ads only

Tool data never leaves your browser. We use cookies only for Google AdSense. Privacy.