Regex Tester
Test and debug regular expressions with live match highlighting, capture groups and flags — plus a quick-reference cheatsheet.
This regex tester runs your pattern against sample text with live match highlighting and capture groups. Use it to test a regular expression, debug why a regex is not matching, or check what a capture group returns before you paste it into code. It uses JavaScript’s native engine and toggles flags like g, i, m and s, with a cheatsheet alongside. It runs in your browser.
Read the guide: How to Test and Debug a Regular Expression3 matches
Contact us: alice@example.com and bob@dev.io Support: help@codingeagles.dev
- $1
- alice
- $2
- example.com
- $1
- bob
- $2
- dev.io
- $1
- help
- $2
- codingeagles.dev
Regex cheatsheet
\dAny digit (0–9)\wWord char (a–z, 0–9, _)\sWhitespace.Any char except newline^Start of string / line$End of string / line*0 or more+1 or more?0 or 1 (optional){n}Exactly n times{n,m}Between n and m times[abc]Any of a, b, c[^abc]None of a, b, c(…)Capture group(?<name>…)Named capture group(?:…)Non-capturing groupa|ba or b\bWord boundary(?=…)Lookahead(?!…)Negative lookaheadHow it works
- 1
Write a pattern
Enter a regex and toggle flags like g, i, m and s.
- 2
Add test text
Paste the text to search; matches highlight as you type.
- 3
Inspect groups
See every match with its captured groups and named captures.
Instant & 100% private — nothing is uploaded
Everything runs locally in your browser. Your code, text and files are processed on your own device and are never sent to a server — so there are no upload waits, no size limits from us, and nothing is ever stored or logged.
Frequently asked questions
- Which regex flavor does it use?
- JavaScript’s native RegExp engine, so behavior matches exactly what runs in the browser and Node.js, including named groups and lookbehind in modern engines.
- Does it show capture groups?
- Yes. Each match lists numbered and named capture groups, so you can confirm your pattern extracts the right parts.
- What do the flags mean?
- g = all matches, i = case-insensitive, m = multiline anchors, s = dot matches newlines, u = unicode, y = sticky. The cheatsheet explains common tokens too.
More tools
More from the Hivly network
Free sister tools on our other sites.