Regex Tester and Replacer
This tool uses the browser's built-in ECMAScript (JavaScript) RegExp engine — what you verify here is exactly what your JavaScript program would do. Other regex flavours (PCRE, Python, Java, .NET) behave differently; patterns are not interchangeable. Everything runs on your device: the pattern and test text are never uploaded, stored, or placed in the URL.
Warning: a pathological pattern (for example nested quantifiers over a long text) can freeze this tab, because a JavaScript regular expression cannot be interrupted once started. This tool offers no "timeout" or "safe mode"; the input limits (pattern 500 characters, text 50,000 characters, replacement 1,000 characters, all counted in Unicode code points) are the only mitigation.
ECMAScript flavour notes
- Lookbehind assertions and named groups (?<name>…) are supported.
- Possessive quantifiers, atomic groups, balancing groups and \G are not supported.
- \d matches ASCII digits only, even under the u flag.
- . does not match line terminators unless the s flag is set.
- Enumeration stops at 1,000 matches and says so; the list is then labelled partial.
- Groups that did not participate are shown distinctly from groups that matched the empty string.