Write correct, efficient regular expressions across different engines.
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install regex或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install regex⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/regex/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: Regex description: Write correct, efficient regular expressions across different engines. metadata: {"clawdbot":{"emoji":"🔍","os":["linux","darwin","win32"]}} ---
. is greedy—matches as much as possible; .? is lazy—matches minimum<.*> on b matches entire string, not + {n,} are greedy—add ? for lazy: +? ? {n,}?\. \* \+ \? \[ \] \( \) \{ \} \| \\ \^ \$[]: only ], \, ^, - need escape (and ^ only at start, - only mid)\\ in regex, but in strings often need \\\\ (double escape)^ start, $ end—but behavior changes with multiline flag^ $ match line starts/ends; without, only string start/end\A always string start, \Z always string end (not all engines)\b matches position, not character—\bword\b for whole words[abc] matches one of a, b, c; [^abc] matches anything except a, b, c[a-z] [0-9]—but [a-Z] is invalid (ASCII order matters)\d digit, \w word char, \s whitespace; uppercase negates: \D \W \S. matches any char except newline—use [\s\S] for truly any, or s flag if available() vs non-capturing (?:)—use (?:) when you don't need backreference(?...) or (?P...) depending on engine\1 \2 refer to captured groups in same patterncat|dog vs ca(t|d)og(?=...): assert what follows, don't consume(?!...): assert what doesn't follow(?<=...): assert what precedes(?: assert what doesn't precede* or + insidei case-insensitive, m multiline (^$ match lines), g global (find all)s (dotall): . matches newline—not supported everywhereu unicode: enables \p{} properties, proper surrogate handling/pattern/flags (JS), (?flags) inline, or function arg (Python re.I)\A \Z; no possessive quantifiersre: uses (?P) for named groups; no \p{} without regex module++ *+; recursive patterns(a+)+ against aaaaaaaaaab is exponential—avoid nested quantifiers++ *+ prevent backtracking—use when backtracking pointless(?>...) don't give back chars—similar to possessive^prefix is O(1), unanchored prefix is O(n)安装 Regex 后,可以对 AI 说这些话来触发它
Help me get started with Regex
Explains what Regex does, walks through the setup, and runs a quick demo based on your current project
Use Regex to write correct, efficient regular expressions across different engines
Invokes Regex with the right parameters and returns the result directly in the conversation
What can I do with Regex in my developer & devops workflow?
Lists the top use cases for Regex, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/regex/ 目录(个人级,所有项目可用),或 .claude/skills/regex/(项目级)。重启 AI 客户端后,用 /regex 主动调用,或让 AI 根据上下文自动发现并使用。
Regex 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
Regex 可免费安装使用。请查阅仓库了解许可证信息。
Write correct, efficient regular expressions across different engines.
Regex 属于「Developer & DevOps」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my developer & devops tasks using Regex
Identifies repetitive steps in your workflow and sets up Regex to handle them automatically