正则表达式测试器 — Uttir
Skip to main content

正则表达式测试器

实时测试正则表达式,高亮显示匹配项。免费、在浏览器中运行,无需上传。

正则表达式测试器 — Regular expressions are powerful but easy to get wrong. This tester shows you exactly what your pattern matches as you type, highlighting every match in your test text and listing capture groups so you can verify the pattern before you ship it.

Your pattern and test text are processed entirely in your browser and never uploaded.

Was 正则表达式测试器 useful?

正则表达式测试器是什么?

Regular expressions are powerful but easy to get wrong. This tester shows you exactly what your pattern matches as you type, highlighting every match in your test text and listing capture groups so you can verify the pattern before you ship it.

Everything runs locally with the browser’s native regex engine, so patterns and sample data never leave the page — fine for testing against real user data, logs, or anything sensitive.

使用方法

  1. Type your pattern

    For example: \b\w+@\w+\.\w+ to match email addresses.

  2. Toggle flags

    Case-insensitive, multiline, dot-all, Unicode, and sticky modes.

  3. Enter test text

    Every match is highlighted and listed with its capture groups.

示例

Find email addresses

A simple pattern that finds email-like strings in a block of text.

\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}\b

结果: All email addresses in the test text, highlighted with capture groups shown.

常见问题

相关指南

相关工具

Last reviewed: 2026-11-21