Composing complex regex from small parts to extract many fields from text
Writing a 200-character regex in one go is how parsing bugs are born. We build patterns the way we build code: named parts, explicit groups, alternation that stays contained, lookaheads for extra rules, then extract every field from log lines and key=value strings with tests that keep it honest.