Regex Tester
Test JavaScript regular expressions with flags, inspect capture groups and find matching text. The result list stops at 100 matches.
Parameters
Enter the regex pattern without delimiters.
The string to test your regex against
Regex flags: g (global), i (case-insensitive), m (multiline).
Results
The regex pattern is not valid
Other results (5)
The pattern matched the test string
Total number of matches found
1. "Hello World, hello regex!" (at index 0) 2. "" (at index 25)
Showing 2 matches
All matched substrings
\.\*
Pattern with special characters escaped for a literal string match
Example input and result
/\d+/g
Order 42, item 742, 7Why Choose Regex Tester
Test JavaScript regular expressions with flags, inspect capture groups and find matching text. The result list stops at 100 matches.
How to Use
- 1Enter the JavaScript regex pattern without slash delimiters.
- 2Enter the test string and flags.
- 3Inspect the match list and capture groups; at most 100 matches are shown.
Frequently Asked Questions (FAQ)
Which regex engine is used?
This tool uses your browser’s JavaScript RegExp engine. PCRE, Python and .NET syntax can differ. Enter the pattern without surrounding slash delimiters; enter g, i, m, s or u in the flags field.
Why does the match count stop at 100?
The displayed list is capped at 100 matches. It is a preview, so the reported count may be smaller than the total number of matches in your text.
Are replacement previews supported?
This page shows matches, capture groups and an escaped literal pattern. It does not provide a replacement input or replacement preview.
Authoritative References & Sources
MDN — JavaScript RegExp
View SourceRelated Tools
Explore more practical tools for the same task.
