Test regular expressions live with real-time match highlighting. ReDoS-safe β runs in a Web Worker with 2s timeout.
This tool lets you test and debug regular expressions in real time directly in your browser. Type or paste a pattern and a test string, toggle flags like global, case-insensitive, multiline, and dotAll, and instantly see every match highlighted in place with group captures listed below.
All matching runs inside a Web Worker with a 2-second timeout to protect against catastrophic backtracking (ReDoS). No data leaves your browser β your patterns and strings are never sent to any server.
Certain regex patterns combined with specific inputs can cause exponential backtracking β this is called ReDoS. To protect your browser from freezing, the regex runs in a separate Web Worker and is automatically killed after 2 seconds, displaying a timeout warning.
The global flag (g) tells the engine to find all matches in the string. Without it, only the first match is returned. Turn it off when you want to test whether a pattern matches the beginning of a string, or when you are testing anchored patterns like ^...$.
Named capture groups use the syntax (?<name>...). The tester currently displays all capture groups (numbered) in the Matches list. Named groups are part of standard JavaScript regex and will be captured and shown alongside positional groups.