Regex utility
Regex Tester
Test a regular expression against sample text and inspect matches.
● This tool runs entirely in your browser. Your input is never uploaded to our servers.
Output
Your result will appear here…
How to use Regex Tester
- Enter a JavaScript regular expression pattern and flags.
- Paste a short test string.
- Select Test to see matching text and positions.
Example
Input:
Order 42 includes 7 items.
Output:
Pattern: \d+ Matches: 2 42 (index 6) 7 (index 17)
Use cases
- Check a validation pattern.
- Explore match positions and global behavior.
- Try a pattern against representative sample text.
About this tool
Test a regular expression against sample text and inspect matches. Processing happens locally in your browser, so your input is not sent to a server or included in analytics.
Frequently asked questions
Which regular expression flavor is used?
The tester uses the JavaScript RegExp engine built into your browser.
What flags can I use?
Use JavaScript flags such as g, i, m, s, u, and y. Each flag can appear only once.
Is my sample text uploaded?
No. Pattern matching runs locally in your browser. Use short test strings because some patterns can take a long time to evaluate.