Regex Explainer
Paste a regular expression and see every token, group, quantifier and flag explained in plain English, with syntax from other engines flagged.
Open toolBuild a regular expression step by step from text, character types, common patterns and groups, test it live and export it for JavaScript, Python or PHP.
Describe what you want to match as a list of steps — exact text, digits, letters, one of a set of characters, one of several words, a ready-made pattern such as an email address, date, IPv4 address or Indian PIN code, or anchors like start of line — and choose how often each step repeats. Special characters in your text are escaped automatically, alternatives are grouped correctly, and any step can be captured as a numbered or named group.
The pattern is tested live against your sample text, with matches highlighted and named groups listed. Tests run in a background worker that is stopped after 1.5 seconds, so a runaway pattern can’t freeze the page. Copy the result as a JavaScript literal or RegExp, a Python re.compile call (named groups converted to (?P<name>…)), or a PHP preg pattern. Each ready-made pattern says what it doesn’t check. Everything runs in your browser. Your data is never uploaded, logged or stored.
Your code or text
JavaScript regex, Python re, PHP PCRE
Processed in this browser
Background thread. Nothing is uploaded.
Your result
Ready to download or copy
Edit the example steps or start empty and add your own.
Set how often each step repeats and which parts to capture.
Check the highlighted matches in the test text.
Copy the pattern for your language.
Zero-upload architecture
Free, with no sign-up or watermark · Your files stay on your device
Launch the app and add your file. There is nothing to install and no account to create.
Set how often each step repeats and which parts to capture.
Copy the pattern for your language.
Paste a regular expression and see every token, group, quantifier and flag explained in plain English, with syntax from other engines flagged.
Open toolTest JavaScript regular expressions with live match highlighting, capture groups and replace preview.
Open toolRemove extra spaces, empty lines, HTML tags, smart quotes and invisible characters in one click.
Open toolEscape text so it matches literally in a regex pattern, a character class or a replacement string, for JavaScript, PCRE, Python, Java, .NET or POSIX.
Open tool