← 返回
未分类

cn-regex-tester

yjkj999999
未分类 community v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 16
下载
💾 0
安装
1
版本
#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秒出结果

版本历史

共 1 个版本

  • v1.0.0 从ClawHub迁移发布 当前
    2026-06-07 11:08 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

suspicious
查看报告

🔗 相关推荐

design-media

agnes-image-gen

user_15292d5a
使用 Agnes AI 的图片生成模型生成图片,支持文生图(agnes-image-2.1-flash)和图生图(agnes-image-2.0-flash)。支持自定义 API Key,用户可使用自己的 Agnes Key。优化重点:降低
★ 1 📥 201
dev-programming

CodeConductor.ai

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

Github

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