hotpromptThe framework

Pattern & text-extraction

5 decisions a prompt of this kind should make on purpose, and 5 things worth leaving out. One of them is something only you can supply — we leave it blank rather than let a model invent it.

Asks that land here

regex, regular expression, grep, ripgrep, glob, jq, sed, awk, extract, pull out, capture group, match pattern, find all, css selector, xpath, pattern to match, pattern that

The moves
  1. +Tool / dialectName the tool and flavor (JS/PCRE regex, ripgrep, jq, sed); default to PCRE/JS regex and say so.
  2. _Sample input + what matchesOnly you know this. Give 2 to 3 real example lines and mark exactly what should and should NOT match.
  3. +Capture vs matchSay whether you need the whole match or specific capture groups, and in what form.
  4. +Edge casesNote tricky cases: unicode, escaping, multiline, greedy vs lazy, empty input.
  5. +Output formReturn the pattern first, then one line explaining each part; no surrounding program unless asked.

Left out for this type: code-writing moves (function signature, integration point, error handling); role prompting ('senior engineer'); tone / voice; wrapping a one-line pattern in a full script; prose 'clean and well-structured'

Try it on one of these