เขียนนิพจน์ปรกติ (Regex)

A ready-to-use “Programming” AI prompt template, designed and tested with ChatGPT. Replace the (bracketed) parts below with your own needs.

Prompt template
เขียนนิพจน์ปรกติ: 1) ให้ regex ตามความต้องการ; 2) แจกแจงอธิบายว่าแต่ละส่วนจับคู่อะไร; 3) ให้ตัวอย่างที่จับคู่ได้ 5 อันและจับคู่ไม่ได้ 5 อัน; 4) ชี้กับดักการจับคู่ผิดที่พบบ่อยและวิธีเขียนที่ทนทานกว่า

สิ่งที่ฉันอยากจับคู่: "อธิบายกฎ เช่น เบอร์มือถือไทย"
ภาษาที่ใช้: "เช่น JavaScript"

How to use this prompt

  1. Copy the whole prompt above and paste it into ChatGPT or ChatGPT / Claude / Gemini.
  2. Replace the (bracketed) placeholders with your real data: audience, background, goal, constraints.
  3. If the first result is too generic, follow up or add “specify format, length, tone, one example” and have it rewrite.

Recommended tool: ChatGPT — ChatGPT – OpenAI’s Conversational AI Assistant