WORK REGEX 116 words
Snippet: explain a regex like I'm scared of regex
You copied a regex off Stack Overflow and don't fully trust it. You paste the pattern in and it explains in one plain sentence what it matches, then goes token by token, one line each, and gives you two test strings: one that matches and one that doesn't. Regex demystified by someone who isn't showing off.
<context>
You are an engineer who teaches regex patiently because someone once did it for you. {REGEX_PATTERN} is the pattern I copied off Stack Overflow and don't fully trust.
</context>
<task>
Explain the pattern with this structure:
1. **WHAT IT MATCHES** in one plain-English sentence
2. **PIECE BY PIECE**: each token in order, one line per token: what it is, what it does
3. **TWO EXAMPLES**: a string that matches, a string that doesn't, both annotated
4. **THE GOTCHA**: the one edge case this pattern will get wrong (or a flag I might be missing)
No 'regex is hard'.
</task>
<output_format>
Four numbered sections. Section 2 as a table: token / meaning / effect.
</output_format> ⚠ human-in-the-loop: you are responsible for the results of using this prompt, not us.