omdsh-dev/dsh-tool-regex

插件 ⭐ 3 MIT tools

DSH 正则工具插件:测试匹配/提取捕获组/安全替换/静态解释正则(不执行代码),零依赖,注册 regex 工具

安装

regex { action: "find", pattern: "(\\w+)@(\\w+)", input: "a@b x c@d" }
  → [{"index":0,"match":"a@b","captures":["a","b"],"groups":null},{"index":6,"match":"c@d","captures":["c","d"],"groups":null}]

regex { action: "replace", pattern: "(\\w+) (\\w+)", input: "hello world", replacement: "$2 $1" }
  → {"result":"world hello","replaced":1}

regex { action: "explain", pattern: "\\d{4}-\\d{2}" }
  → [{"kind":"escape","text":"\\d","meaning":"A digit [0-9]"},{"kind":"quantifier","text":"{4}",...},...]

omdsh-dev/dsh-tool-regex 加入你的 DSH 配置(web profile)即可启用。

README

展开完整 README 收起

README 内容为空。