企评社

Interface labels are shown in English. Company reviews, forum posts and tool descriptions are currently available in Chinese only.

Regular expression tester

Paste text and an expression to see every match highlighted at once, with positions and capture groups, plus hints on errors

匹配与高亮全部在浏览器本地完成,文本不上传、不留存

常用模式(点击填入表达式与示例文本)

标志:

匹配结果

输入表达式与文本后这里会实时显示结果;也可以先点上方一个常用模式试试。

FAQ

Is my text uploaded?

No. Matching and highlighting run entirely locally in the browser, without a single server request; check the developer tools Network panel and you will only see the page's own static assets.

Why does it say no match when I am sure it should match?

Check in order: one, leave off the surrounding slashes - this page takes the pattern body only; two, compare the flags - case-insensitive needs i, ^ and $ matching line starts and ends needs m, the dot matching newlines needs s; three, special characters (. * + ? and the like) need backslash escaping. You can also tap the common patterns above - they fill in a pattern and sample text so you see the effect directly.

What do the flags g / i / m / s / u do?

g matches globally - it lists every match, not just the first; i ignores case; m is multiline mode, where ^ and $ match line starts and ends; s lets the dot match newline characters too; u turns on Unicode mode, enabling \p{L} property escapes. The results on this page are always listed globally so you see them all at once.

What if the page freezes?

A badly written regex (nested quantifiers like (a+)+) can backtrack exponentially on long text and briefly lock the page - just reload; your content only exists in the browser and was never uploaded anywhere. Validate the expression on short text first, and for long inputs prefer linear-time patterns (avoid nested quantifiers).

Related tools