🔍

Regular tester

Test regular expressions in real time and highlight matching results

results
-

Frequently asked questions

Is the regex tester safe? Will the entered text be uploaded to the server?

Totally safe. All matching operations of regular expressions and test text are completed locally in the browser, and the data will not be uploaded to any server or recorded.

What do the three signs g, i, and m mean?

g (global) means global matching, which will find all matches instead of just the first one; i (ignoreCase) means ignoring case; m (multiline) means multi-line mode, allowing ^ and $ to match the beginning and end of each line instead of the beginning and end of the entire string.

How to match Chinese characters?

Use the Unicode range [一-龥] to match commonly used Chinese characters. If you need to match a wider range of Unicode letters, you can combine \p{L} and turn on the u flag (browser native regex support).

Can the regex tester be used offline?

Yes. This tool is a single file HTML. After the page is saved locally, it can run normally even if the Internet is disconnected. No installation or registration is required.

Why does my regular expression match here, but not in the code?

The common reason is string escaping problem: when writing regular in JavaScript string, backslash needs double escaping (such as \\d means \d), but in regular literal /\d/, no additional escaping is required. Just check the escaping rules for your language.