开发者工具

正则表达式测试器

实时匹配高亮测试正则表达式并提取分组

no pattern
//
Test String0 chars · 1 lines
Substitution Result
Match Information
Match 1 of 1
Match 1
empty string
index 0 · length 0
✨ AIAssistant
Explanation
Enter a pattern to see its breakdown
History

Regex Tester & Debugger

Test and debug regular expressions with live match highlighting, group capture, and flag support. Works with JavaScript regex syntax. Paste your pattern, enter test text, and see matches instantly.

FAQ

What regex flags are supported?

g (global), i (case-insensitive), m (multiline), s (dotAll), u (unicode), and y (sticky) — the same flags as JavaScript's RegExp.

How do I match a whole word?

Use word boundaries: \bword\b matches 'word' but not 'words' or 'keyword'.

How do I make a regex case-insensitive?

Add the i flag. /hello/i will match Hello, HELLO, hElLo, etc.

What is a capture group?

Parentheses create a capture group: (\d+) captures one or more digits. Named groups use (?<name>pattern).

没找到需要的?

我们根据社区反馈开发免费工具。欢迎提出能改善您工作流的工具建议!

正则表达式测试器 — 免费工具在线 | FreeTool24 | FreeTool24