## Lesson — Always iterate through all regex matches (e.g.,

**Tags:** architecture, curated
**Pattern:** \.(match|exec)\s*\(
**Engine:** regex
**Scope:** packages/cli/src/adapters/**/*.ts, packages/mcp/src/**/*.ts, !**/*.test.ts
**Severity:** error

Always iterate through all regex matches (e.g..
