360 Secure SkillHub
360 安全技能中心

Regex Playground

这是一款交互式正则表达式学习测试工具,核心功能包括实时匹配验证、提取匹配分组、解释正则逻辑、查询常用正则模式库、生成邮箱/网址等测试用例。典型场景有开发者学习正则、调试代码中的正则、验证输入格式、提取字符串数据。输入为命令行指令,输出清晰展示匹配结果、分组内容及逻辑说明。

chenxuyaun
chenxuyaun
热度 62.52
最近更新 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