Regex Tester
Test regular expressions with real-time matching and explanation
/
/
flags
Common Patterns
Regex Flavor Differences
This tool uses JavaScript regex. Here's how common patterns differ across languages:
| Feature | JavaScript | Python | PCRE (PHP/Perl) |
|---|---|---|---|
| Named Groups | (?<name>...) |
(?P<name>...) |
(?<name>...) or (?P<name>...) |
| Lookbehind | (?<=...) (ES2018+) |
(?<=...) |
(?<=...) |
| Unicode Property | \p{L} (with u flag) |
Not supported natively | \p{L} |
| Word Boundary | \b |
\b |
\b |
| Atomic Groups | Not supported | Not supported | (?>...) |
| Possessive Quantifiers | Not supported | Not supported (use regex module) |
*+, ++, ?+ |
| Recursive Patterns | Not supported | Not supported (use regex module) |
(?R), (?1) |
| Conditional Patterns | Not supported | (?(id)yes|no) |
(?(id)yes|no) |
Tip: For cross-platform compatibility, stick to basic regex features: character classes
[...], quantifiers *+?{}, anchors ^$, groups (...), and alternation |.