Regex Tester
Test regular expressions in real time with match highlighting, flags and capture groups. No sign-up.
Regex Tester
Built by
Miguel Ángel Colorado Marin
Built by
Miguel Ángel Colorado Marin
Full-Stack Developer · Guadalajara, España
I develop web apps, digital tools and full projects — from design to deployment.
How to use the regex tester?
- 1
Write your regular expression
Enter the regex pattern in the top field. You can type it directly or choose from the quick reference patterns. The expression compiles in real time and errors are shown instantly.
- 2
Activate the flags you need
Click the g, i, m, s or u buttons to toggle each flag. The g (global) flag is active by default and finds all matches. The i flag makes the search case-insensitive.
- 3
Paste the test string
Enter the text where you want to find matches. Matches are highlighted in yellow directly in the text. You'll see the total match count next to the field label.
- 4
Analyze groups and details
In the match list you'll see the full text of each match, its position (index), length and capture groups both numbered and named.
Frequently asked questions
What is a regular expression?
A regular expression (regex) is a search pattern made up of characters and metacharacters that describes a set of text strings. They are used in programming to search, validate and transform text. For example, the pattern \d+ matches one or more numeric digits.
What is the difference between flags g and i?
The g (global) flag makes the search find all occurrences of the pattern, not just the first. The i (insensitive) flag makes the search ignore differences between uppercase and lowercase, so 'Hello' would match the pattern 'hello'.
What are capture groups used for?
Capture groups, written with parentheses (), let you extract specific parts of a match. For example, with pattern (\d{4})-(\d{2})-(\d{2}) on a date like '2024-03-15', you can capture the year, month and day separately.
Is there a text size limit?
Yes, the test string is limited to 50,000 characters to prevent regex patterns with catastrophic backtracking that could freeze the browser. For most use cases this limit is more than enough.
Is my data sent to any server?
No. All processing happens in your browser using JavaScript's regex engine. No text, pattern or result leaves your device. The tool works even without an internet connection.
Embed the regex tester on your site
Embed this regex tester in any web page with a simple iframe:
<iframe
src="https://miguelacm.es/embed/regex-tester"
width="100%"
height="600"
frameborder="0"
title="Regex Tester"
></iframe>View embed in new tab →