## Lesson — Avoid naive substring matching when extracting counts

**Tags:** regex, documentation, metrics

Avoid naive substring matching when extracting counts or metrics from source code; anchor regexes to object properties (e.g., `lessonHash\s*:`) to prevent counting occurrences in comments, imports, or type definitions.
