This online regex tester helps developers instantly verify match results when writing, debugging, and optimizing regular expressions. It supports JavaScript and PCRE2 engine switching, real-time match highlighting, capture group display, replacement preview, 30+ common patterns, and a syntax cheat sheet. All processing runs locally in the browser—no test data is uploaded to any server.
Features
Switch between JavaScript and PCRE2 engines in real time
Instant matching with live highlight of all matches
Display capture groups and named capture groups
Built-in replace panel with backreference support
30+ common regex patterns loadable with one click
Complete syntax cheat sheet with JS/PCRE/Python/Java compatibility
How to Use
1Enter a regex pattern and select flags
2Type or paste the test string
3View real-time match highlights and the match details table
4Expand the replace panel to preview replacement results
5Switch to PCRE2 engine to test advanced regex syntax
6Browse the cheat sheet or pattern library for common patterns
FAQ
Is test data uploaded to a server?
No. All regex matching and replacement runs locally in your browser. Your patterns and test strings never leave your device.
What is the difference between JavaScript and PCRE2 engines?
The JavaScript engine uses the browser's native RegExp, supporting standard regex syntax. The PCRE2 engine supports advanced features like lookbehind assertions, atomic groups, recursion, subroutine calls, and possessive quantifiers. Incompatible flags are automatically converted when switching engines.
Which regex flags are supported?
The JavaScript engine supports g (global), i (case insensitive), m (multiline), s (dotall), and u (unicode). The PCRE2 engine additionally supports x (extended), A (anchored), and D (dollar end only).
Can I use the patterns from the library directly?
The pattern library provides 30+ common regex templates that load into the testing area with one click. Most patterns are simplified for quick verification and daily use; production environments may require adjustments for specific needs.
Does the replace panel support backreferences?
Yes. The JavaScript engine uses $1, $2 to reference capture groups; named groups use $. The PCRE2 engine uses \\1, \\2 or ${1}, ${2} format.
What if the PCRE2 engine fails to load?
The PCRE2 engine loads a WASM file from CDN, which may take a moment on first use. If loading fails, the tool automatically falls back to the JavaScript engine. Check your network connection and try again.