Developer Tools

Regex Tester

Test regular expressions with real-time match highlighting, capture groups, replace mode, and a quick reference cheatsheet -- all in your browser.

100% local
Runs in your browser
Zero sent
No tracking, no servers
/ / g
Without the g flag, only the first match is replaced
Regex Cheatsheet

Common Patterns

How to Use the Regex Tester

  1. 1
    Enter your pattern in the input field. Toggle flags (g, i, m, s, u) to control matching behavior.
  2. 2
    Add your test string in the text area below. Matches highlight in real-time as you type.
  3. 3
    View matches in the results panel. See each match, its position, and any capture groups.
  4. 4
    Use replace mode to preview text substitutions. Use $1, $2 for capture group references.

Frequently Asked Questions

How does the Regex Tester work?
It uses your browser's native JavaScript RegExp engine to test patterns against your text in real-time. All processing happens locally -- your data never leaves your device.
Will complex patterns freeze my browser?
No. All regex execution runs in a Web Worker with a 2-second timeout. If a pattern causes catastrophic backtracking, the worker is terminated and you see a timeout warning instead of a frozen tab.
What regex flags are supported?
Global (g), case-insensitive (i), multiline (m), dotAll (s), and unicode (u). Toggle them on or off with the flag buttons next to the pattern input.
Can I use capture groups?
Yes. Named and numbered capture groups are displayed in the match list. Use parentheses for numbered groups and (?<name>...) for named groups.
Is my data stored anywhere?
No. Everything runs entirely in your browser using JavaScript. No data is sent to any server, stored in cookies, or saved to local storage.