Regex Tester
Enter your regex pattern and test text. Matches are highlighted in real time. Enable flags (global, case-insensitive, multiline) with the toggles. Use Common Patterns for quick-start templates.
Common Patterns
Common questions
What regex engine does the tool use?
The tool uses JavaScript's built-in ECMAScript RegExp engine. It supports capturing groups, named groups (?...), lookahead, lookbehind, and flags g, i, m, s, u, and d. It does not support variable-length lookbehind or PCRE-specific syntax.
What are capture groups?
Capture groups, written as parentheses in a pattern, extract a portion of a match as a separate result. For example, (\d{4})-(\d{2})-(\d{2}) applied to 2025-01-15 yields three groups: 2025, 01, and 15. Named groups (?\d{4}) let you access results by name instead of index.
Why doesn't my regex work in PHP or Python?
Different languages use different regex dialects. PHP uses PCRE, Python uses its own re module, JavaScript uses ECMAScript RegExp. They differ in syntax for groups, lookbehind constraints, Unicode handling, and available flags. A regex that works in JavaScript may need minor adjustments in another environment.