Which regex engine does this tool use?▾
The tool uses the browser's native JavaScript RegExp engine, which implements the ECMAScript regular expression specification. This means results are accurate for JavaScript code but may differ slightly from PCRE (used in PHP, Python re, Perl) or POSIX regex dialects.
Why does my pattern match nothing even though I think it should?▾
Common causes include forgetting the g (global) flag when expecting multiple matches, using PCRE syntax not supported in JavaScript (such as \K or possessive quantifiers), or having invisible whitespace in the test string that the pattern does not account for.
How do I test a pattern with special regex characters in the input?▾
Special characters in the test string (the input you are matching against) need no escaping — only the pattern field uses regex syntax. If you want to match a literal dot, question mark, or parenthesis in the pattern, escape it with a backslash: \., \?, \(.
What is the difference between the m and s flags?▾
The m (multiline) flag makes ^ and $ match at the start and end of each line rather than just the whole string. The s (dotAll) flag makes the . metacharacter match newline characters as well as all other characters — it has no effect on ^ and $ anchors.
Can I test patterns with lookaheads and lookbehinds?▾
Yes. The JavaScript engine in modern browsers supports both positive and negative lookaheads ((?=...) and (?!...)) and lookbehinds ((?<=...) and (?<!...)). Lookbehinds require a current-generation browser (Chrome 62+, Firefox 78+, Safari 16.4+).
Why does the g flag matter?▾
Without the g (global) flag, RegExp.exec finds only the first match and stops. With g, the tool finds all non-overlapping matches across the entire test string and displays each one in the match list. You almost always want g when testing against real data.
Can I use this to test patterns for Python or PHP?▾
The tool uses the JavaScript engine, so syntax is slightly different from Python's re module or PHP's PCRE. Most common patterns work identically, but Python-specific syntax like (?P<name>...) named groups or PHP-specific modifiers will not work. Use it as a close approximation and verify in the target language.
Is there a risk of catastrophic backtracking with complex patterns?▾
Yes. Poorly written patterns with nested quantifiers can cause exponential backtracking, making the browser tab appear to freeze. The tool does not impose a timeout by default, so be cautious with patterns like (a+)+ against long strings. If the page becomes unresponsive, refresh to reset.