Task prompt · Data

Write a regex to clean a column

by Agent Yard Team

Get a tested pattern that finds or fixes messy values like phone numbers, codes or dates.

You'll attach

Text only

Works with

ChatGPTClaudeGeminiGrokCopilotGrok Bot

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.

How to use it

  1. Open chatgpt.com or claude.ai (or another AI listed here).
  2. Fill in the highlighted blank ([EXAMPLES]) below, or edit them after pasting.
  3. Copy the prompt, paste it into the chat and send.

Fill in the blanks (optional)

Prompt

Remix
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 best new prompts and personas, nothing else.

The Weekly is presented byyour brandSponsored · open

More Data prompts

Footer partner · openThis strip runs at the foot of every page. One partner at a time.Ask about it →