Test JavaScript regular expressions locally.
Try a pattern against sample text, inspect matches, and iterate quickly in the browser.
Workspace
Regex is valid. Found 2 matches.
Choose a common example or enter your own JavaScript regex.
Matches
1. "dev@example.com" at index 8 2. "admin@example.org" at index 27
Highlighted text
Contact dev@example.com or admin@example.org for access.
About this regex tester
Use this regex tester to try JavaScript regular expressions against sample text and inspect each match with its index.
Common use cases
- Validate a pattern before using it in frontend or Node.js code.
- Check flags such as g, i, and m quickly.
- Debug extraction rules for logs, input validation, or text cleanup.
How to use this tool
- Enter a JavaScript regular expression pattern and flags.
- Paste representative test text or load one of the examples.
- Review the match list and highlighted text before using the pattern in code.
Example
Input
\b\w+@\w+\.\w+\b
Output
"dev@example.com" at index 8
Common errors
- Unclosed groups, brackets, or character classes cause JavaScript RegExp syntax errors.
- Duplicate or unsupported flags make the pattern invalid before matching starts.
- A valid regex can still produce no matches if the sample text does not contain the target shape.
Privacy note
Dev Atlas keeps this tool local in your browser. Your input is not intentionally uploaded to a Dev Atlas server for processing.
FAQ
Which regex engine is used?
It uses the JavaScript RegExp engine in your browser.
Can it replace text?
This first version focuses on testing and match inspection.
Why does an invalid pattern show an error?
The browser RegExp parser reports syntax errors before matching can run.