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

  • g (global)
  • gi (global, ignore case)
  • m (multiline)
  • gim (global, ignore case, multiline)
Results
—
—

เครื่องทดสอบ Regex จะคอมไพล์นิพจน์ Regular ด้วย Flags ที่คุณเลือก และรายงานจำนวนจุดที่ตรงกับข้อความตัวอย่าง พร้อมแสดงรายการแต่ละจุดที่ตรงเพื่อให้คุณตรวจสอบรูปแบบของคุณ

สูตร
result = text.match(new RegExp(pattern, flags))

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

Flags ของ Regex หมายถึงอะไร?
g จะหาทุกจุดที่ตรงแทนจุดแรก, i ไม่สนใจตัวพิมพ์เล็ก/ใหญ่ และ m ยอมให้ ^ และ $ จับคู่ที่ต้นและท้ายบรรทัด

Embed this calculator on your site

Cite this page

About these results

Every calculation on this page runs locally in your browser using published, standard formulas — nothing you enter is sent to a server. Results are estimates for planning purposes and can differ from real-world conditions; always follow your local building code and the advice of a qualified professional for final decisions. You can read more about who builds and maintains these tools on our About page. เกี่ยวกับเรา MateCalc.

เครื่องคิดเลขที่เกี่ยวข้อง