Regex Tester
Test regular expressions with live match highlighting.
About the Regex Tester
Write and test regular expressions with live highlighted matches, a capture group table, a replace preview, and a cheatsheet of common patterns. Input length is capped to avoid catastrophic backtracking.
Examples
Email match
(\w+)@(\w+)\.comOutput
Matches ada@example.comKeyboard shortcuts
- Copy the main outputCtrl / ⌘ + Shift + C
- Download the resultCtrl / ⌘ + S
- Share this toolCtrl / ⌘ + Shift + S
- Reset the inputsAlt + R
- Open the tool search paletteCtrl / ⌘ + K
Related tools
Regex Cheatsheet
Dev Utilities
Searchable regex syntax reference with examples and copy buttons.
Code Comment Stripper
Dev Utilities
Remove comments from JS, HTML, Python, or SQL source.
Code Screenshot Generator
Dev Utilities
Turn code snippets into shareable syntax-highlighted images.
Line Sorter & Deduper
Dev Utilities
Sort, dedupe, and filter lines with regex include/exclude.
Markdown TOC Generator
Dev Utilities
Build a linked table of contents from Markdown headings.
String Escaper
Dev Utilities
Escape and unescape strings for JSON, JS, HTML, XML, SQL, RegExp, and shell.
Frequently asked questions
Read more
- Regex patterns every developer should know
A working set of regular expressions for emails, URLs, whitespace and validation — plus how to test them safely.
- Writing safer regular expressions: avoiding catastrophic backtracking
ReDoS bugs come from a small number of recognizable patterns. Here's how to spot them and write regexes that stay fast on any input.
- Regex lookahead and lookbehind in practice
What (?=...), (?!...), (?<=...) and (?<!...) actually do, with real patterns for passwords, numbers and text extraction.
- Testing a regex once, then shipping it in JavaScript, Python, Java and Go
Regex syntax is portable in theory and fiddly in practice. Here is how to test a pattern, read its groups, and export a working snippet for seven languages.
Version 1.0.0 · Updated 2026-08-06 · Runs entirely in your browser