All tools › For Developers
Regular Expression Tester
Write an expression and instantly see matches, groups, the replacement and a part-by-part breakdown in plain English. Plus “should match / should not match” tests.
What the tool can do
- Match highlighting, a table of groups with names and positions, replacement with $1, $<name> and $&.
- A part-by-part explanation of the expression in plain language: what each parenthesis, class and quantifier does.
- Test mode: mark examples with + (should match) and − (should not match) and immediately see which of them the expression handles wrongly.
- Protection against “catastrophic backtracking”: a heavy expression is interrupted after 2.5 seconds, and the page does not freeze.
- 13 ready-made patterns: email, Russian phone number, dates, IP, colors, hashtags and others.
- Ready-made code for JavaScript, Python, PHP, Go, Java and C# with correct escaping.
Your browser's regular expression engine is used (JavaScript syntax). In other languages some features may differ, for example lookbehind in older versions.