regex-vs-llm-structured-text
affaan-m/everything-claude-code
A practical decision framework for determining whether to use regular expressions or Large Language Models (LLMs) when parsing structured text (e.g., forms, quizzes, invoices). It recommends starting with deterministic, low-cost regex for 95-98% of structured data, and only invoking expensive LLM calls for identifying and validating ambiguous edge cases, optimizing both cost and accuracy.