Regex tester
Test regular expressions live and see the highlighted matches, the capture groups and the result of the replacement.
How to useTest your regular expression.
Matches
Regex tester: what it is for
The regular expression tester highlights each match in the text as you type, lists the capture groups with the position of each one and shows the result of the replacement with $1, $2.
It has ready-made patterns for email, US phone numbers, ZIP codes, URLs and dates. It uses JavaScript regex, which runs in your browser.
How to use
- Type the expression and the flags.
- Paste the test text.
- Check the matches, the groups and the replacement.
When to use it
- Validating form fields.
- Extracting data from text and logs.
- Learning and debugging regex.
Frequently asked questions
Which regex flavor is used?
JavaScript's (ECMAScript), the same as in the browser and Node.js. In most cases it is very similar to Python, PHP and Java.
What do the flags mean?
g finds all occurrences, i ignores case, m makes ^ and $ apply to each line, s makes the dot match line breaks and u turns on Unicode mode.
Is it really free?
Yes, 100% free. No sign-up, no subscription and no usage limits. All Tools123 tools are free and run right in your browser.