360 Secure SkillHub
360 安全技能中心

Axiom Regex Visualizer

纯标准库实现的 Python 工具,把正则表达式解析为组件结构,标注分组、量词、锚点与字符类,并为各部分生成通俗英文说明,支持 Python re 语法的基本与扩展特性;不测试字符串是否匹配,也不支持 Perl/PCRE 专有特性。

kofna3369
kofna3369
热度 24.10
最近更新 2026-06-15 12:50:08
分类:开发依赖:代码执行应用场景:调试排错

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add axiom-regex-visualizer
Metadata
name
axiom-regex-visualizer
description
Regex visualizer — parse any regex and visualize its structure (groups, quantifiers, anchors, character classes). Use when you need to understand or document a regex. Pure stdlib, no LLM.
version
0.1.2
license
Apache-2.0

axiom-regex-visualizer

Version: 0.1.2 Axioma Tools

Parses regular expressions and shows their structure visually.

What this skill does

  • Visual tree of regex components
  • Plain-English explanation of each part
  • Highlights groups, quantifiers, anchors
  • Supports Python re syntax (basic + extensions)

When to use this skill

  • ✅ Understand a regex you didn't write
  • ✅ Document a complex pattern
  • ✅ Debug regex matching issues
  • ❌ Test if regex matches a string (use re.match)
  • ❌ Support Perl/PCRE-only features

Usage

python3 axiom_regex_visualizer.py "^(?:[a-z0-9!#$%&*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&*+/=?^_`{|}~-]+)*)@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$"
from axiom_regex_visualizer import parse, explain
tree = parse(r'\b\d{3}-\d{4}\b')
explain(tree)  # 'Word boundary, exactly 3 digits, dash, exactly 4 digits, word boundary'

Validation

Check Status
Unit tests 20+ cases
Performance <100ms
Security Pure stdlib, no injection
Determinism Byte-to-byte stable
License Apache-2.0

Last updated: 2026-06-14