Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Is that skill safe to install?
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
Are you the author of Regex Vs Llm?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/karthikrshet-regex-vs-llm)
---
name: regex-vs-llm
description: Decide between deterministic parsing (regex, parsers) and LLM extraction for structured text, and combine them safely.
tags: [ai-agents]
---
# Regex Vs Llm
## When to use
- Extracting data from logs, emails, documents or user input
## Procedure
1. Try a deterministic parser first for fixed formats
2. Use an LLM with a schema for variable or messy text
3. Validate LLM output with the same schema
4. Fall back from one to the other
5. Measure accuracy on a labelled sample
## Checklist
- [ ] Accuracy measured
- [ ] Costs estimated per document
## Anti-patterns
- Calling an LLM to parse ISO dates