Regex Tester
Test a regular expression against sample text with live highlighting and capture groups.
Highlighted
2 matches
#1 at index 14: hello@example.com
Groups: [1] hello [2] example.com
#2 at index 35: support@easyapplibrary.com
Groups: [1] support [2] easyapplibrary.com
How to use Regex Tester
- 01Enter your pattern and choose the flags you need — g for all matches, i to ignore case, m for multiline.
- 02Paste the text you want to test against.
- 03Matches are highlighted as you type, with each match and its capture groups listed below.
About Regex Tester
This tester runs the JavaScript regular expression engine, so what you see here is exactly what your code will do in a browser or in Node. Flags, lazy quantifiers, lookahead and named groups all behave identically.
Two habits prevent most regex pain: prefer specific character classes over the dot, and anchor your pattern when you mean the whole string. Nested quantifiers such as (a+)+ can backtrack catastrophically on long inputs, so keep them out of anything that touches user input.
Frequently asked questions
- Which regex dialect is this?
- JavaScript's, so results match what your front-end or Node code will produce.
- Why does my pattern only find one match?
- Add the g flag. Without it the engine stops after the first match.
- Are capture groups shown?
- Yes, every match lists its index and each numbered capture group.
Related tools and tools
JSON Formatter
Paste JSON to pretty-print, minify or validate it, with the exact position of any error.
Diff Checker
Compare two texts line by line and see exactly what was added or removed.
Text Case Converter
Switch text between uppercase, lowercase, title, sentence, camel, snake and kebab case.
CSV to JSON Converter
Turn CSV data into clean JSON, with proper handling of quotes and delimiters.