Library › Coding AI › Marketing and content
Explain an analytics URL filter to a content writer
Practice: Saying who it's for. About 5 minutes.
About this exercise
Your content writer Lina asked why her new pages don't show in the blog report. Copy the filter regex into one code block, then write exactly 3 numbered lines labeled Matches:, Doesn't match: and Lina's pages:, each one plain sentence with no regex terms (no caret, anchor, character class or group). The last line must say which of her two URLs below fail and why. Under 70 words outside the code.
Common mistakes when you ask AI for this
- Not saying who reads it. The AI walks through each symbol, which means nothing to a writer. Try: Add: "For a content writer: no regex terms or symbols."
- Not connecting it to her pages. The AI explains the pattern but never says why her two URLs fail. Try: Add: "Say which of her URLs fail and why."
- Leaving the shape open. The AI writes a long breakdown with a table of symbols. Try: Add: "Exactly 3 numbered lines labeled Matches:, Doesn't match:, Lina's pages:."
- Getting a menu of options. The AI likes to offer two or three versions of the regex, so you're left to pick and test them yourself. Try: Add: "Give one regex only, in one code block, no alternatives."
- Getting a tutorial. By default the AI explains every part of the code at length, which you then have to scroll past. Try: Add: "After the code, one line under 20 words. Nothing else."
What a strong prompt includes
- Says who it's for
- Asks about her pages
- Asks for labeled lines
- Bans regex jargon
Related exercises
- Add a cron line that matches the others in a crontab (Coding AI · Product managers)
- Add dark mode by overriding your existing CSS variables (Coding AI · Software developers)
- Add input checks to your number guessing game (Coding AI · High school students)
- Add input validation to a Java method with exact messages (Coding AI · Software developers)
- Add labels to a signup form without rewriting the page (Coding AI · High school students)