Email regex validation without fuzzing
You asked an assistant to write a regex to validate and extract user emails from free-text comments in a JavaScript service. It produced one that matches every example you tried and the PR is otherwise clean. You don't deeply understand the pattern. How do you verify it's correct and safe before it goes in front of untrusted input — without just trusting that it 'works on the examples'?
Implement
is_plausible_email(candidate: str) → boolExamples
in
["user+tag@example.co.uk"]outtruein
["user@@example.com"]outfalsein
["user@example"]outfalseWhat a strong answer looks like
Treat the AI’s output as a draft to verify, not an answer to trust. Name the specific flaw and the input that triggers it, say how you’d catch it (tests, edge cases, reading critically), and how you’d re-prompt or decompose to get it right.
0:00 of about 16 min
Vibe & agentic: describe the solution in plain language (or narrate it) and the coach grades your approach.
Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.
Run or narrate your approach, then ask the coach.