【中文说明】用于逐 token 解释 Python 正则表达式,测试必须匹配和不得匹配的样例,并检查灾难性回溯、未转义点号、空匹配、缺少锚点等风险。使用时提供正则、目标语言、正反例和期望捕获组,模型会展示匹配跨度与命名组,并在必要时给出更安全的改写。 Explains Python regular expressions token by token, tests them on must-match and must-not-match samples with spans and named groups, and flags risky patterns: nested quantifiers that backtrack catastrophically, [A-z], unescaped dots, empty matches, and missing anchors, then proposes a safer rewrite. Use when a user asks "what does this regex do?", "why doesn't it match?", or "is this regex safe?". Includes a tested stdlib Python checker.