
Regex Vs Llm Structured Text
This is the hybrid parsing strategy you wish someone had told you about earlier. Use regex to handle the 95-98% of structured text that follows predictable patterns (quiz questions, forms, invoices), then add confidence scoring to flag the edge cases, and only call an LLM for those low-confidence extractions. The source shows real production metrics: 410 quiz items parsed, only 8 flagged for LLM review, 95% cost savings versus sending everything to Claude. The key insight is that regex is deterministic and nearly free, so you should always try it first and treat LLM calls as expensive exception handling rather than your primary parser.
- skills.sh installs
- 5.5K
- GitHub stars
- 300.3K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add affaan-m/ecc --skill regex-vs-llm-structured-text --agent claude-codeInstalls into .claude/skills of the current project.
Files
Regex vs LLM for Structured Text Parsing
A practical decision framework for parsing structured text (quizzes, forms, invoices, documents). The key insight: regex handles 95-98% of cases cheaply and deterministically. Reserve expensive LLM calls for the remaining edge cases.
When to Activate
- Parsing structured text with repeating patterns (questions, forms, tables)
- Deciding between regex and LLM for text extraction
- Building hybrid pipelines that combine both approaches
- Optimizing cost/accuracy tradeoffs in text processing
Decision Framework
Is the text format consistent and repeating?
├── Yes (>90% follows a pattern) → Start with Regex
│ ├── Regex handles 95%+ → Done, no LLM needed
│ └── Regex handles <95% → Add LLM for edge cases only
└── No (free-form, highly variable) → Use LLM directly
Architecture Pattern
Sponsors
Details
- Repository
- github.com/affaan-m/ecc
- Categories
- Backend & APIs, AI & Agent Building, Productivity & Planning
- First seen
- Jul 14, 2026
More from affaan-m/ecc
All 263- Investor Outreach5.5K
- Homelab Wireguard Vpn5.5K
- Repo Scan5.5K
- Agent Payment X4025.5K
- Ck5.5K
- Clickhouse Io5.5K
- Terminal Ops5.4K
- Knowledge Ops5.4K
- Nutrient Document Processing5.4K
- Kotlin Exposed Patterns5.4K
- Claude Devfleet5.4K
- Finance Billing Ops5.4K
- Healthcare Cdss Patterns5.4K
- Ui To Vue5.4K
- Homelab Network Readiness5.4K
- Quality Nonconformance5.4K
- Cost Tracking5.4K
- Homelab Vlan Segmentation5.4K
- Gateguard5.4K
- Workspace Surface Audit5.4K
- Plan Orchestrate5.4K
- Production Scheduling5.4K
- Automation Audit Ops5.4K
- Canary Watch5.4K