{"id":"code-work-mkt-explain-url-regex","audience":"marketing","category":"coding","track":"coding","technique":"audience","title":"Explain an analytics URL filter to a content writer","free":false,"task":"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.","materialLabel":"The report filter and Lina's message (attached to your prompt automatically)","material":"ANALYTICS - \"Blog posts\" report, page path filter (matches regex):\n^/(blog|guides)/[a-z0-9-]+/?$\n\nPaths in last month's report (all matched):\n/blog/how-to-wax-boots\n/guides/tent-sizing/\n/blog/spring-trail-checklist-2026\n\nLina's message:\n\"My two new posts aren't in the report! They're live at\n/blog/Trail-Snacks-For-Kids\n/blog/gear/best-rain-shells\nIs the tracking broken??\"\n\nNotes:\n- The filter was set up by an agency in 2024.\n- The CMS lets writers pick their own URL slug.\n- Reports refresh every morning.\n- Lina joined the team in September and writes two posts a week.\n- The old site used capitalized folder names, which were changed to lowercase during the 2024 redesign.\n- Guides are long how-to pages; blog posts are shorter news and tips.\n- The report is shared with the whole marketing team every Monday.","rules":[{"type":"codeBlocks","count":1},{"type":"numberedItems","count":3},{"type":"maxProseWords","max":70}],"mistakes":[{"title":"Not saying who reads it","why":"The AI walks through each symbol, which means nothing to a writer.","fix":"Add: \"For a content writer: no regex terms or symbols.\"","checks":["r2"]},{"title":"Not connecting it to her pages","why":"The AI explains the pattern but never says why her two URLs fail.","fix":"Add: \"Say which of her URLs fail and why.\"","checks":["r1"]},{"title":"Leaving the shape open","why":"The AI writes a long breakdown with a table of symbols.","fix":"Add: \"Exactly 3 numbered lines labeled Matches:, Doesn't match:, Lina's pages:.\"","checks":["numberedItems","r0"]},{"title":"Getting a menu of options","why":"The AI likes to offer two or three versions of the regex, so you're left to pick and test them yourself.","fix":"Add: \"Give one regex only, in one code block, no alternatives.\"","checks":["codeBlocks"]},{"title":"Getting a tutorial","why":"By default the AI explains every part of the code at length, which you then have to scroll past.","fix":"Add: \"After the code, one line under 20 words. Nothing else.\"","checks":["maxProseWords"]}],"promptHints":[{"label":"Says who it's for","patterns":["writer","lina","non-?technical","plain"]},{"label":"Asks about her pages","patterns":["her (two )?(pages|urls|posts)","why .{0,20}fail"]},{"label":"Asks for labeled lines","patterns":["matches:","doesn'?t match","labeled","numbered"]},{"label":"Bans regex jargon","patterns":["no (regex|jargon|symbols)","plain (words|english)"]}],"hint":"Lina doesn't care how regex works; she wants to know why her pages are missing. Ask for exactly that, in her words.","rubricLabels":["The Matches: line says it counts pages one level under /blog/ or /guides/ whose names use only lowercase letters, numbers and hyphens, with an optional ending slash","The Lina's pages: line says /blog/Trail-Snacks-For-Kids fails because of capital letters and /blog/gear/best-rain-shells fails because it has an extra folder level","None of the 3 lines uses regex terms such as caret, anchor, character class, group or the symbols ^ $ [ ]"]}