Regex Tester
Build and debug JavaScript regular expressions with live feedback. Toggle flags (g, i, m, s, u, y), see every match highlighted in your test string, inspect numbered and named capture groups in a table, and switch to Replace mode for a live preview of the substituted output. Fully client-side, uses your browser's native RegExp engine so behavior matches what you'll see in production JS code.
| # | Index | Match | Groups |
|---|---|---|---|
| 1 | 8 | alice@example.com | $1: alice $2: example.com |
| 2 | 29 | bob@test.io | $1: bob $2: test.io |
Frequently Asked Questions
- What regex dialect does this use?
- Native JavaScript regex — ECMAScript 2018+. Flags g, i, m, s, u, y are supported. Named capture groups (?<name>...) and lookbehinds work in all modern browsers. If you need PCRE or Python-style regex, the output may differ slightly.
- How do I reference capture groups in the replacement?
- Use $1, $2, etc. for numbered groups and $<name> for named groups. $& inserts the whole match, $` inserts the text before the match, $' inserts the text after. $$ inserts a literal dollar sign.
- Why is my global match only showing one result?
- Make sure the 'g' flag is toggled on. Without 'g', regex.exec() only finds the first match. The tool uses different logic depending on whether 'g' is set to match real-world JavaScript behavior.
- Does this tool send my regex or test string to a server?
- No. Everything runs locally in your browser using the native RegExp engine. Safe to test patterns against logs, PII, or internal data.
Related Tools
Markdown Cheat Sheet
Interactive Markdown cheat sheet with live examples. Free Markdown syntax reference guide.
Regex Find & Replace
Find and replace text in Markdown using regex. Free online regex find and replace with live preview.
YAML Frontmatter Editor
Visual editor for YAML/TOML frontmatter. Free online frontmatter builder for Jekyll, Hugo, and Astro.
Transcript Cleaner
Clean up auto-generated transcripts, SRT subtitles, and raw captions. Remove timestamps, filler words, and speaker labels. Free online transcript cleaner.
About Regex Tester
Live regex testing with match highlighting, capture group tables, and replace preview. A browser-based alternative to regex101 for JavaScript regex. This tool runs entirely in your browser, so your content is not sent to a server. MarkdownMe provides free, fast, and reliable Markdown tools for developers, writers, and anyone who works with Markdown.