regex-vs-llm-structured-text
选择在解析结构化文本时使用正则表达式还是大型语言模型的决策框架——从正则表达式开始,仅在低置信度的边缘情况下添加大型语言模型。
Content Preview
--- name: regex-vs-llm-structured-text description: 选择在解析结构化文本时使用正则表达式还是大型语言模型的决策框架——从正则表达式开始,仅在低置信度的边缘情况下添加大型语言模型。 origin: ECC --- # 正则表达式 vs LLM 用于结构化文本解析 一个用于解析结构化文本(测验、表单、发票、文档)的实用决策框架。核心见解是:正则表达式能以低成本、确定性的方式处理 95-98% 的情况。将昂贵的 LLM 调用留给剩余的边缘情况。 ## 何时使用 * 解析具有重复模式的结构化文本(问题、表单、表格) * 决定在文本提取时使用正则表达式还是 LLM * 构建结合两种方法的混合管道 * 在文本处理中优化成本/准确性权衡 ## 决策框架 ``` Is the text format consistent and repeating? ├── Yes (>90% follows a pattern) → Start with Regex │ ├── Regex handles 95%+ → Done, no LLM n
How to Use
Recommended: Install to project (local)
mkdir -p .claude/skills
curl -o .claude/skills/regex-vs-llm-structured-text.md \
https://raw.githubusercontent.com/affaan-m/everything-claude-code/main/docs/zh-CN/skills/regex-vs-llm-structured-text/SKILL.mdSkill is scoped to this project only. Add .claude/skills/ to your .gitignoreif you don't want to commit it.
Alternative: Clone full repo
git clone https://github.com/affaan-m/everything-claude-codeThen reference at docs/zh-CN/skills/regex-vs-llm-structured-text/SKILL.md
Related Skills
burpsuite-project-parser
Searches and explores Burp Suite project files (.burp) from the command line. Use when searching response headers or bodies with regex patterns, extracting security audit findings, dumping proxy history or site map data, or analyzing HTTP traffic captured in a Burp project.
securityburpsuiteparser
by sickn33 (Antigravity) · antigravity-awesome-skills
Tracking Regression Tests
This skill enables Claude to track and run regression tests, ensuring new changes don't break existing functionality. It is triggered when the user asks to "track regression", "run regression tests", or uses the shortcut "reg". The skill helps in maintaining code stability by identifying critical te
skill-adaptertracking regression tests
by jeremylongshore · plugins-plus-skills
Monitoring CPU Usage
This skill enables Claude to monitor and analyze CPU usage patterns within applications. It helps identify CPU hotspots, analyze algorithmic complexity, and detect blocking operations. Use this skill when the user asks to "monitor CPU usage", "optimize CPU performance", "analyze CPU load", or "find
skill-adaptermonitoring cpu usage
by jeremylongshore · plugins-plus-skills
find
Search and locate tasks across all orchestrations using various criteria.
commandsfind
by qdhenry · claude-command-suite