https://shadtools.comRegex Tester
Test JavaScript regular expressions against sample text and inspect captures and named groups.
Matches
2http://localhost:4321Capture groups
Named groups
Patterns run with the browser's JavaScript regular expression engine. Avoid untrusted patterns that can cause excessive backtracking.
How to test a regular expression
Enter the pattern without surrounding slash delimiters, add JavaScript flags such as g, i, or m, and paste representative input. The match panel reports the full match, its zero-based index, numbered capture groups, and named groups.
JavaScript regex flags
gfinds every match instead of stopping after the first.iperforms case-insensitive matching.mchanges^and$to work at line boundaries.sallows dot to match newline characters.uenables Unicode-aware pattern behavior.yrequires the next match to begin exactly at the current index.
Use small, representative examples while developing a pattern, then test edge cases and non-matching input before using it in production.
Frequently Asked Questions
Which regex flavor does this tester use?+
It uses the JavaScript RegExp engine built into your browser, including supported flags and named capture groups. Behavior can differ from PCRE, Python, Java, or .NET regex engines.
What does the g flag do?+
The global flag asks the engine to continue after the first match. Without g or the sticky y flag, the tester reports only the first match.
Can a regular expression freeze the browser?+
Some patterns can trigger catastrophic backtracking on certain inputs. The tool limits pattern and input size, but JavaScript cannot safely interrupt every expensive synchronous regex, so only run patterns you trust.