正则表达式在线测试器

Free 免费 · 无需注册 · 数据不上传 Real-time · Group capture · Flags
/
/
Enter a pattern above and test string below

更多开发工具

Cron 生成器
构建定时任务
URL 编码
百分比编码
时间戳
Unix ↔ 日期
CSS 格式化
格式化与压缩
HTML 格式化
格式化美化
SQL 格式化
格式化 SQL
Base64
编码/解码
JSON 格式化
格式化、验证与压缩

为什么这是最好的在线正则表达式测试器

实时匹配高亮

Matches are highlighted in real-time as you type your regex pattern. See exactly what your expression captures.

捕获组

View all capture groups and their matched values displayed clearly below the test string.

支持所有标志位

Toggle g (global), i (case-insensitive), m (multiline), and s (dotall) flags with one click.

匹配详情

See the exact index position and length of each match for precise debugging.

常见问题

What regex flavor does this tester use?

This tester uses JavaScript's built-in RegExp engine, which is the standard for web development and Node.js applications.

How do I test a regex for email validation?

Enter your email regex pattern like /^[\w.-]+@[\w.-]+\.[a-z]{2,}$/i in the pattern field, then type a test email in the test string area to see live matching.

Why does my regex not match across lines?

By default, . does not match newlines. Enable the s (dotall) flag to make . match any character including newlines, or use m (multiline) to make ^ and $ match line boundaries.

深度指南
开发者必备工具指南
正则、Cron、时间戳、URL 等
阅读指南