Regular expression
Enter the pattern without surrounding slashes.
Common patterns
Load a starter regex and adapt it.
Test text
Paste the text or code you want to scan.
Highlighted preview
Highlighted matches will appear here.
Highlighted matches will appear here.
Matches and groups
Matches will appear here.
Replacement preview
Replacement preview will appear here.
Replacement preview will appear here.
Regex Tester
Regex Tester lets you write a regular expression, test it against text, highlight matches, inspect capture groups and preview replacements directly in the browser.
Regex patterns and test text are processed locally in the browser. Nothing is uploaded or stored.
Features
- Live regex syntax validation
- Highlighted matches in the test text
- Match list with indexes and capture groups
- Replacement preview with your replacement string
- Common regex templates for email, URL, IP, dates and more
How to use
-
Enter a pattern
Type the regular expression pattern without surrounding slashes.
-
Choose flags
Enable case-insensitive, multiline, dotAll, unicode or sticky behavior as needed.
-
Paste test text
Add the text you want to scan. Matches update as you edit.
-
Use templates
Load a common regex from the library and adapt it to your case.
FAQ
Is my text uploaded?
No. Pattern compilation, matching and replacement previews run locally in the browser.
Why is global matching always used?
The tester adds global scanning internally so it can list every match. Your selected flags are still shown.
Can it show capture groups?
Yes. Each match row lists numbered captures and named captures when the browser supports them.