เครื่องทดสอบ Regex

เรียกใช้การจับคู่รูปแบบและการแสดงตัวอย่างการแทนที่ในเบราว์เซอร์ของคุณ

วิธีใช้

  1. ป้อนรูปแบบ regex ของคุณและเลือกธงเช่น g, i หรือ m
  2. วางข้อความทดสอบแล้วคลิกเรียกใช้เพื่อตรวจสอบตำแหน่งและค่าที่ตรงกัน
  3. ตั้งค่าข้อความแทนที่เพื่อดูตัวอย่างเอาต์พุตที่แปลงแล้วก่อนนำไปใช้ที่อื่น

คำถามที่พบบ่อย

เหตุใดจึงไม่มีการส่งคืนแมตช์

ตรวจสอบการหลบหนีการตั้งค่าสถานะและรูปแบบของคุณคาดหวังการจับคู่แบบเต็มสตริงกับบางส่วนหรือไม่

เครื่องมือนี้รองรับการจับภาพกลุ่มแทนหรือไม่

ใช่คุณสามารถใช้โทเค็นทดแทนเช่น $1, $2 ฯลฯเช่นเดียวกับการแทนที่มาตรฐาน JavaScript

Test regular expressions and preview replacements online

Use this free regex tester to check pattern matches, inspect match positions, try flags like g, i, and m, and preview replacements before using them in code, configs, or text-processing workflows. Everything runs locally in your browser.

Common regex tasks

Debug validation patterns

Test email, phone, ID, slug, and input-validation regex patterns before shipping them into forms or backend rules.

Inspect match positions quickly

See which substrings match and where they appear in the input, which helps when debugging greedy patterns or boundary conditions.

Preview find-and-replace safely

Try replacement strings such as $1 or $2 before applying bulk edits in editors, scripts, or migration jobs.

คำถามที่พบบ่อย

เหตุใดจึงไม่มีการส่งคืนแมตช์
ตรวจสอบการหลบหนีการตั้งค่าสถานะและรูปแบบของคุณคาดหวังการจับคู่แบบเต็มสตริงกับบางส่วนหรือไม่
เครื่องมือนี้รองรับการจับภาพกลุ่มแทนหรือไม่
ใช่คุณสามารถใช้โทเค็นทดแทนเช่น $1, $2 ฯลฯเช่นเดียวกับการแทนที่มาตรฐาน JavaScript
Does this regex tester run locally?
Yes. Pattern matching and replacement preview run in your browser, so your test input is not sent away by the tool itself.

Continue with adjacent tools that fit the same workflow.