Free Regex Tester
Test JavaScript regular expressions with live highlighting, capture groups, replace and a plain-language explanation. Runs entirely in your browser.
Regexly · by ToolBookly
🔒 Runs entirely in your browser · Nothing uploaded or saved · Share links never expire · Free, no sign-up
Matches highlighted
Match details
| # | Position | Match | Groups |
|---|
Explanation
(?<year>start capture group "year"\da digit 0–9{4}…repeated exactly 4 times)end of group-the text "-"(?<month>start capture group "month"\da digit 0–9{2}…repeated exactly 2 times)end of group-the text "-"(?<day>start capture group "day"\da digit 0–9{2}…repeated exactly 2 times)end of group
Code
const re = /(?<year>\d{4})-(?<month>\d{2})-(?<day>\d{2})/g;
const matches = [...text.matchAll(re)];Escape text for regex
How to test a regex
Enter a pattern and pick flags, or start from a preset such as email, URL or date.
Matches are highlighted live, with every capture group listed. Nothing is uploaded.
Each part of the pattern is explained in plain words, so you can spot mistakes.
Test a replacement, copy JavaScript or Python code, or copy a share link that never expires.
A regex tester that keeps your text private
Regexly runs your pattern with your browser's own JavaScript regex engine, so results match what your code will do. The test text never leaves your device. When you share, everything is packed into the link after the #, which browsers never send to servers, so there is no database of saved patterns and the link never expires.
Features
- Live highlighting, capture groups and named groups for every match
- Find and replace preview with $1, $<name> and $&
- Plain-language explanation of each token, plus presets for email, URL, Hong Kong phone, HKID format, Chinese characters and more
- Export to JavaScript or Python; slow patterns are stopped instead of freezing the tab
Why Regexly?
- 🚫 No upload: your test text and pattern never leave your browser
- ♾️ Share links never expire and are not stored on any server
- ⏱️ Safe with slow patterns: matching runs in a worker with a time limit
- 🆓 Free, no sign-up, no limits
All ToolBookly tools · JSONly · Diffly · Hashly · CaseShift