360 Secure SkillHub
360 安全技能中心

Regex Playground

该 Skill 以命令形式提供正则表达式的学习与调试体验:输入模式和测试字符串后,可得到匹配结果、捕获分组以及逐段英文解释,并内置常见正则模式速查表,支持按邮箱、URL、电话等类型生成测试用例。适用于调试复杂正则、学习匹配规则和校验输入格式。

chenxuyaun
chenxuyaun
热度 62.41
最近更新 2026-05-11 17:31:12
分类:开发依赖:纯提示词应用场景:调试排错 / 概念解释 / 教学辅导

安装技能

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

执行命令安装此 skill: npx secure-skills-cli add regex-playground
Metadata
name
regex-playground
description
Learn, test, and debug regular expressions with real-time matching, explanations, and common patterns. Perfect for developers learning regex or debugging complex patterns.
metadata
{"openclaw":{"requires":{"bins":[]},"install":[]}}

Regex Playground

Interactive regular expression learning and testing tool.

Usage

regex "pattern" "test string"

Features

  • 🎯 Real-time matching
  • 📖 Plain English explanation
  • 🔍 Match groups extraction
  • 📋 Common patterns library
  • 🧪 Test cases generator

Example

Input: regex "(\w+)@(\w+)\.(\w+)" "test@example.com"

Output:
✓ Match: test@example.com
Group 1: test
Group 2: example  
Group 3: com

Explanation:
- (\w+) - capture word characters (test)
- @ - literal @
- (\w+) - capture word characters (example)
- \. - literal dot
- (\w+) - capture word characters (com)

Common Patterns

Pattern Meaning Example
\d+ One or more digits 123
\w+ Word characters hello_123
[a-z] Letter range a, b, c
^start Starts with start...
end$ Ends with ...end
`a b` OR
a* Zero or more a '', a, aaa
a+ One or more a a, aaa

Commands

  • regex explain <pattern> - Explain pattern in plain English
  • regex test <pattern> <string> - Test pattern against string
  • regex library - Show common patterns
  • regex generate <type> - Generate test cases (email, url, phone, etc.)

Use Cases

  • Debug regex in code
  • Learn regex by seeing matches
  • Validate input patterns
  • Extract data from strings