360 Secure SkillHub
360 安全技能中心

regex-explainer

面向开发者解释粘贴的正则表达式:按 token 说明分组、量词和字符类,提示贪婪匹配、锚点等常见问题,并给出一个匹配和一个不匹配的示例字符串;可询问正则方言,纯文本处理,不执行表达式。

hmahmadcs
hmahmadcs
热度 27.33
最近更新 2026-10-17 20:49:44
分类:开发依赖:纯提示词应用场景:调试排错 / 概念解释 / 教学辅导

安装技能

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

执行命令安装此 skill: npx secure-skills-cli add hmahmadcs/regex-explainer
Metadata
name
regex-explainer
description
Explain a regular expression in plain language and call out likely bugs. Use when the user pastes a regex they do not fully understand.

Regex Explainer

Purpose / Overview

Walks a regex token-by-token and notes greediness / anchors / groups.

When to Use

Debugging validation, log parsers, or search patterns.

Usage / Instructions

  1. Ask for the regex and the flavor (JS/PCRE/Python) if relevant.
  2. Explain groups, quantifiers, and character classes.
  3. Give one matching and one non-matching example string.

Examples

Input: ^\d{3}-\d{2}$ Output: start, three digits, hyphen, two digits, end; matches 123-45.

Requirements / Dependencies

None.

Limitations / Caveats

Does not execute against user files unless asked.

Security / Permissions

Text-only.

Description

Explain a regular expression in plain language and call out likely bugs.

License or terms

MIT

Use case

Aimed at developers and operators whose goal matches: Explain a regular expression in plain language and call out likely bugs.

Risks and mitigations

References

Ethical considerations

Use that is illegal under local or international law is not permitted. The publisher will not be accountable for misuse enabled by this skill. Examples of unacceptable use include unauthorized data exfiltration, copyright piracy operations, and assisting financial crime. Do not use it to generate instructions for committing crimes.