regex-tester
Validate, test, and debug regular expressions by executing them against sample inputs. Use when asked to build, verify, or explain a regex pattern.
- License 许可
- MIT
- 最近更新
- 2026-11-14
- Stars
- ★ 1.5w
- Forks
- 2.6k
01 前言 Front Matter
- name
- regex-tester
- description
- Validate, test, and debug regular expressions by executing them against sample inputs. Use when asked to build, verify, or explain a regex pattern.
02 资源文件 15
- 其他.env.example308 B
- 其他.gitignore180 B
- 参考文档package.json697 B
- 参考文档README.md5.4 KB
- 参考文档references/advanced-strategies.md2.5 KB
- 参考文档references/advanced-techniques.md2.3 KB
- 参考文档references/core-patterns.md2.5 KB
- 参考文档references/examples-api.md2.2 KB
- 参考文档references/examples-architecture.md2.6 KB
- 参考文档references/examples-debug.md2.4 KB
- 参考文档references/regex-cheatsheet.md2.5 KB
- 脚本scripts/format-thought.js4.7 KB
- 脚本scripts/process-thought.js6.6 KB
- 脚本tests/format-thought.test.js3.6 KB
- 脚本tests/process-thought.test.js5.6 KB
03 SKILL.md 正文
Usage
When the user asks you to create, validate, or debug a regular expression:
- Understand the requirement — clarify what the pattern should match and what it should reject.
- Consult the cheatsheet — review
references/regex-cheatsheet.mdfor syntax reminders if needed. - Write and execute test code — use the
execute_codetool to run Python code that:- Compiles the regex with
re.compile() - Tests it against a set of positive examples (should match) and negative examples (should not match)
- Extracts and displays any capturing groups
- Reports pass/fail for each test case
- Compiles the regex with
- Iterate — if any test fails, refine the pattern and re-run until all cases pass.
- Present the result — give the user the final pattern, explain what each part does, and show the test results.
Example Test Script
import re
pattern = re.compile(r'^[\w.+-]+@[\w-]+\.[\w.-]+$')
positives = ["user@example.com", "first.last+tag@sub.domain.org"]
negatives = ["@missing.com", "no-at-sign", "spaces in@address.com"]
for s in positives:
assert pattern.match(s), f"FAIL: expected match for '{s}'"
for s in negatives:
assert not pattern.match(s), f"FAIL: expected no match for '{s}'"
print("All tests passed!")
04 同仓库更多 Skills
draft-release-notes
Create or rewrite Agent Framework release notes from a generated GitHub release log. Use when preparing Python or .NET release notes, filtering mixed-language changelogs, deduplicating changes, preserving inline contributor credits, or documenting breaking-change migrations from pull requests. Requires the user to provide the generated GitHub log, language, and release version before work begins.
agent-framework-builder-python
Use this skill when building, modifying, reviewing, evaluating, integrating, or hosting Python applications with Microsoft Agent Framework. Use it for Agent Framework agents, harness agents, workflows, orchestrations, declarative definitions, tools, sessions, middleware, evaluation, observability, integrations, or hosting, even when the user has not yet chosen the correct framework pattern.
agent-framework-builder-dotnet
Use this skill when building, modifying, reviewing, evaluating, integrating, or hosting .NET (C#) applications with Microsoft Agent Framework. Use it for Agent Framework agents, harness agents, workflows, orchestrations, declarative definitions, tools, sessions, middleware, evaluation, observability, integrations, or hosting, even when the user has not yet chosen the correct framework pattern.
foundry-hosted-agent-validation
Step-by-step process for validating a Python Foundry hosted agent sample (under python/samples/04-hosting/foundry-hosted-agents/) end to end — running it locally (native runtime and `azd ai agent run`) and after deploying it to an Azure AI Foundry project with `azd`. Use this when asked to validate a hosted agent sample.
foundry-config-setup
Resolve missing setup caused by a hardcoded Foundry project endpoint or model in a sample. Use when a sample fails because it uses a placeholder/hardcoded project_endpoint (for example "https://your-project.services.ai.azure.com") or a hardcoded model instead of reading them from the environment.
support-style
Contoso Outdoors customer-support tone and formatting guidelines.