Task prompt · Data
Write a regex to clean a column
by Agent Yard TeamGet a tested pattern that finds or fixes messy values like phone numbers, codes or dates.
Use cases
- Get a tested pattern that finds or fixes messy values like phone numbers, codes or dates.
- Reuse it as often as you like: fill in the blanks (examples) with new details and copy again.
- With ChatGPT, Claude, Gemini and more, the AIs that support what this prompt needs.
Featured in: Best ChatGPT prompts for Python, Best AI prompts for cleaning messy data.
How to use it
- Open chatgpt.com or claude.ai (or another AI listed here).
- Fill in the highlighted blank ([EXAMPLES]) below, or edit them after pasting.
- Copy the prompt, paste it into the chat and send.
Fill in the blanks (optional)
Prompt
I need a regular expression for [TOOL: Google Sheets / Excel / Python / JavaScript]. Goal: [WHAT TO MATCH OR FIX, e.g. pull 5-digit ZIP codes out of addresses]. Example values that SHOULD match: [EXAMPLES] Example values that should NOT match: [EXAMPLES] Give me: 1. The pattern, ready to paste into that tool (with the exact formula if it's a spreadsheet). 2. A piece-by-piece explanation in plain words. 3. A table testing it against every example above. 4. Edge cases it will miss.
One email a week
The Weekly is presented byyour brandSponsored · openThe best new prompts and personas, nothing else.