ToolBooklyRegexly
中文

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

//g
Flags

Matches highlighted

Invoice 2026-10-08, due 2026-11-07. Shipped 2026-10-09.

Match details

#PositionMatchGroups

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

1
Type your regex

Enter a pattern and pick flags, or start from a preset such as email, URL or date.

2
Paste test text

Matches are highlighted live, with every capture group listed. Nothing is uploaded.

3
Read the explanation

Each part of the pattern is explained in plain words, so you can spot mistakes.

4
Replace, export or share

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

Frequently Asked Questions

Is my test text uploaded anywhere?
No. Regexly runs your regular expression with your browser's own JavaScript engine. The pattern and the text you test it on stay on your device; nothing is sent to ToolBookly or anyone else, and nothing is saved on a server.
How do share links work without a server?
The pattern, flags, test text and replacement are compressed and placed in the link after the # sign. Browsers never send that part of a URL to a server, so whoever opens the link decodes it on their own device. Many regex testers save your pattern and text in their database to make a share link; Regexly has no database, no account and no list of saved links.
Do Regexly share links expire?
No. Everything lives in the link itself, so it keeps working for as long as the link exists, and nobody can delete it from a server. Very long test text makes a long link, so trim it to a short sample before sharing.
Which regex flavor does Regexly use?
JavaScript (ECMAScript) regular expressions, exactly as your browser runs them, with the g, i, m, s, u and y flags, named groups, lookbehind and Unicode property escapes such as \p{Script=Han}. Regexly can also export the pattern as Python code and converts named groups to Python syntax for you.
What happens if my regex is too slow?
Matching runs in a background worker with a time limit. If a pattern takes too long, usually because of catastrophic backtracking such as (a+)+$, Regexly stops it and tells you, instead of freezing the tab.
Can I test find and replace?
Yes. Turn on Replace, type a replacement such as $1, $<name> or $& and see the result live, then copy it.
How do I match Chinese characters with a regex?
Use \p{Script=Han} with the u flag, for example \p{Script=Han}+ to match runs of Chinese characters. The Chinese characters preset in Regexly loads this pattern with a sample.
Is Regexly free?
Yes. Free, no sign-up, no usage limits. It is part of the ToolBookly suite of browser tools.