AGENT SKILL
regex
Pattern matching.
- License 许可
- MIT
- 所属仓库
- dhaupin/vant
- 最近更新
- 2026-11-13
- Stars
- ★ 16
- Forks
- 1
01 前言 Front Matter
- name
- regex
- license
- MIT
- metadata
- { "author": "vant", "version": "1.0" }
- description
- Pattern matching.
03 SKILL.md 正文
Regex
Pattern matching.
When To Use
- Find patterns
- Validate input
- Extract data
What To Do
1. Basics
| Pattern | What |
|---|---|
| . | Any character |
| * | 0 or more |
| + | 1 or more |
| ? | 0 or 1 |
| ^ | Start |
| $ | End |
2. Classes
[abc] # a, b, or c
[^abc] # not a, b, c
[a-z] # a to z
\d # digit
\w # word
\s # space
3. Groups
(abc) # Capture
(?:abc) # Non-capture
(?<name>abc) # Named
4. Use
const match = str.match(/\d+/g)
const valid = /^\S+@\S+\.\S+$/.test(email)
Role: Regex Developer Input: String + pattern Output: Match
Patterns.
04 同仓库更多 Skills
yaml
Data serialization.
★ 16
vite
Frontend build tool.
★ 16
typescript
Typed JavaScript.
★ 16
test-unit
Test individual functions and methods in isolation. Test happy path, edge cases, and error handling. Use when adding new functions, after bug fixes, or before commits.
★ 16
test-snapshot
Capture and compare UI/component snapshots to detect visual changes. Use when testing UI rendering, before visual changes, or for design systems.
★ 16
test-smoke
Quick sanity check to verify basic functionality works. Run fastest tests first. Use when needing quick verification before deeper testing.
★ 16