Skip to main content
Glama
Br0ski777

regex-generator

by Br0ski777

Regex Tester API

MCP Server x402 License: MIT

针对字符串测试正则表达式模式。获取所有匹配项、捕获组、位置以及通俗易懂的模式说明。通过 x402(Base L2 上的 USDC)按次付费——无需 API 密钥,无需注册,也没有速率限制。

属于 klymax402 市场的一部分——为 AI 智能体打造的 100 个 x402 微支付 API,一个钱包,USDC 在 Base 上结算。

快速开始 -- MCP

将以下内容添加到你的 MCP 客户端配置中(Claude Desktop、Cursor、ElizaOS 等):

{
  "mcpServers": {
    "regex-generator": {
      "url": "https://regex-generator.api.klymax402.com/mcp"
    }
  }
}

Related MCP server: x402-sub-agent-mcp

快速开始 -- HTTP(x402)

curl -X POST "https://regex-generator.api.klymax402.com/api/test" \
  -H "Content-Type: application/json" \
  -d '{"pattern":"...","testStrings":"..."}'
# -> 402 Payment Required, with an x402 payment challenge in the response body

任何支持 x402 的客户端(@x402/fetch、x402-agent-tools、ATXP)都会自动处理 402 -> 签名 -> 重试循环。

工具

工具

方法

路径

价格

描述

text_test_regex

POST

/api/test

$0.003

针对输入字符串测试正则表达式模式

text_test_regex

当你需要针对一个或多个字符串测试某个正则表达式时,使用此工具。它返回所有匹配项、捕获组、位置以及人类可读的模式说明。

参数

名称

类型

必填

描述

pattern

string

是

正则表达式模式(不含定界符)

flags

string

否

正则表达式标志:g、i、m、s、u(默认:g)

testStrings

array

是

用于测试该模式的字符串数组

示例响应:

{"pattern":"\d{3}-\d{4}","flags":"g","explanation":"Matches 3 digits, a hyphen, then 4 digits","results":[{"input":"Call 555-1234","matched":true,"matches":[{"value":"555-1234","index":5,"groups":[]}]}],"totalMatches":1}

适用场景:在将正则模式部署到代码中之前进行验证、调试某个模式为何无法匹配,或从文本中提取结构化数据。在把复杂正则写入生产代码之前,请先使用此工具。

不适用于:文本分类(请使用 text_classify_content)、PII 检测(请使用 privacy_detect_pii)、文本文本比较(请使用 text_compare_diff)。

示例智能体提示词

  • "针对一个或多个字符串测试某个正则表达式"

支付

  • 协议:x402 -- 基于 HTTP 的原生按次付费,无需注册,无需 API 密钥

  • 网络:Base L2(eip155:8453)

  • 资产:USDC

  • 促成方:Coinbase CDP(主要)、PayAI(备用)

  • 也可通过 ATXP(OAuth 包装的 x402,RFC 9728 受保护资源元数据)访问

属于 klymax402

为 AI 智能体打造的 100 个 x402 微支付 API——一个钱包,USDC 在 Base 上结算,无需注册。

许可证

MIT

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    C
    maintenance
    MCP server for managing x402 payment policies (rules, coupons, tiers, usage logs) conversationally via LLM and evaluating request decisions.
    -
  • F
    license
    Not graded
    quality
    C
    maintenance
    Lets users generate regex patterns from plain-English descriptions, then verifies them with Python's real re engine against generated positive and negative test strings, iterating on failures until they pass. It exposes this as a tool callable from MCP clients such as Claude Desktop or Claude Code.
    -