← 返回
未分类

Cn Regex Tester

正则表达式测试工具。输入正则和文本,返回匹配结果和数量。纯Python标准库re模块,无需API Key。
正则测试工具,输入正则和文本,输出匹配结果与数量。基于Python标准库re,无需APIKey。
freedompixels
未分类 clawhub v1.2.7 2 版本 100000 Key: 无需
★ 0
Stars
📥 411
下载
💾 0
安装
2
版本
#latest

概述

正则表达式测试器

输入正则表达式和文本,返回匹配结果。纯Python标准库,无需API Key。

功能

  • 正则匹配:查找所有匹配项
  • 正则替换:将匹配内容替换为空(删除匹配)
  • JSON输出:结构化输出,便于程序处理

使用方法

python3 scripts/regex_tester.py <正则表达式> <文本>

示例

# 匹配数字
python3 scripts/regex_tester.py '\d+' 'hello123world456'
# 输出: {"matches": ["123", "456"], "count": 2}

# 匹配单词
python3 scripts/regex_tester.py '[a-z]+' 'Hello World'
# 输出: {"matches": ["ello", "orld"], "count": 2}

# 匹配邮箱
python3 scripts/regex_tester.py '\w+@\w+\.\w+' 'test@example.com'
# 输出: {"matches": ["test@example.com"], "count": 1}

# 替换(删除匹配)
python3 scripts/regex_tester.py '\d+' 'order123 price456'
# 输出: {"result": "order price"}

输出格式

{
  "matches": ["匹配结果列表"],
  "count": 匹配数量,
  "result": "替换后的文本(替换模式下)"
}

分类

开发工具

关键词

正则, regex, 正则表达式, 测试, tester, match


出品: AISoBrand|爱索品牌 — AI搜索优化工具

官网: https://aisobrand.com

免费检测你的品牌在AI搜索中有没有存在感 → 30秒出结果

版本历史

共 2 个版本

  • v1.2.7 当前
    2026-06-07 12:42
  • v1.2.5
    2026-05-07 13:45 安全 安全

安全检测

腾讯云安全 (Keen)

队列中

腾讯云安全 (Sanbu)

队列中

🔗 相关推荐

dev-programming

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 681 📥 329,905
dev-programming

Mcporter

steipete
使用 mcporter CLI 直接列出、配置、认证及调用 MCP 服务器/工具(支持 HTTP 或 stdio),涵盖临时服务器、配置编辑及 CLI/类型生成功能。
★ 197 📥 68,033
dev-programming

CodeConductor.ai

larsonreever
AI驱动平台,提供快速全栈开发、智能体、工作流自动化及低代码AI集成的可扩展产品创建。
★ 78 📥 182,615