分类

Glob转正则

将文件匹配模式 (Glob) 转换为正则表达式

将 Glob 模式(如 `src/**/*.ts`)转换为标准的正则表达式。这对于理解 Glob 模式和创建自定义文件匹配逻辑非常有用。

支持花括号扩展,如 {a,b,c}

支持 ** 递归目录匹配

不区分大小写匹配

One string per line. Results will show which strings match.

API 文档

请求端点

POST /zh/api/tools/glob-to-regex

请求参数

参数名 类型 必填 描述
globPattern text -
extended checkbox 支持花括号扩展,如 {a,b,c}
globstar checkbox 支持 ** 递归目录匹配
caseInsensitive checkbox 不区分大小写匹配
testString textarea One string per line. Results will show which strings match.

响应格式

{
  "key": {...},
  "metadata": {
    "key": "value"
  },
  "error": "Error message (optional)",
  "message": "Notification message (optional)"
}
JSON数据: JSON数据

AI MCP 文档

将此工具添加到您的 MCP 服务器配置中:

{
  "mcpServers": {
    "elysiatools-glob-to-regex": {
      "name": "glob-to-regex",
      "description": "将文件匹配模式 (Glob) 转换为正则表达式",
      "baseUrl": "https://elysiatools.com/mcp/sse?toolId=glob-to-regex",
      "command": "",
      "args": [],
      "env": {},
      "isActive": true,
      "type": "sse"
    }
  }
}

你可以串联多个工具,比如:`https://elysiatools.com/mcp/sse?toolId=png-to-webp,jpg-to-webp,gif-to-webp`,最多20个。

如果遇见问题,请联系我们:[email protected]