Regex Tester – Free Online Regular Expression Tester
Write a regular expression pattern, toggle flags (g, i, m, s), and see every match highlighted in real-time. View match index, value, and capture groups for each result.
"Hello"
Index: 0
"World"
Index: 6
"The"
Index: 13
"Quick"
Index: 17
"Brown"
Index: 23
"Fox"
Index: 29
"Jumps"
Index: 33
"Over"
Index: 39
"The"
Index: 44
"Lazy"
Index: 48
"Dog"
Index: 53
How to Use
- 1
Enter your regex pattern
Type your regular expression in the pattern field (without the / delimiters).
- 2
Toggle flags
Enable g (global), i (case-insensitive), m (multiline), or s (dot-all) flags as needed.
- 3
Paste your test string
Type or paste the text you want to test the regex against in the Test String area.
- 4
Inspect matches
Matches are highlighted in the result area. Scroll the match list to see index and capture group details.
Frequently Asked Questions
What regex flavor is used?+
This tool uses JavaScript's built-in RegExp engine, which follows the ECMAScript regex specification. It supports lookaheads, named groups, and Unicode patterns.
What are capture groups?+
Capture groups are portions of the regex pattern enclosed in parentheses (e.g., (\d+)). The matched text for each group is shown separately in the match details.
Why use the 'g' flag?+
The global flag (g) makes the regex find ALL matches in the test string. Without it, only the first match is returned.
Can I test multi-line patterns?+
Yes. Enable the 'm' (multiline) flag to make ^ and $ match the start/end of each line rather than the whole string.