Trình kiểm tra Regex

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

Trình kiểm tra Regex biên dịch biểu thức chính quy với các cờ bạn chọn và báo số lần khớp tìm thấy trong văn bản mẫu, liệt kê từng lần khớp để bạn xác minh mẫu của mình.

Công thức
result = text.match(new RegExp(pattern, flags))

Câu hỏi thường gặp

Các cờ regex có nghĩa gì?
g tìm tất cả lần khớp thay vì lần đầu, i bỏ qua hoa/thường và m cho phép ^ và $ khớp ở đầu và cuối dòng.

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. Giới thiệu MateCalc.

Máy tính liên quan