Công cụ định dạng & Mã
Trình kiểm tra Regex
Trình kiểm tra regex miễn phí với tính năng tô sáng trực tiếp. Viết regex JavaScript, xem các kết quả khớp và nhóm bắt giữ cập nhật khi bạn nhập. Cùng một công cụ trình duyệt của bạn sử dụng.
- #1 · index 6ada@example.com
- $1ada
- $2example.com
- #2 · index 25grace.hopper@navy.mil
- $1grace.hopper
- $2navy.mil
Toggle on to write a replacement string and see the result. Use $1, $2, … to reference capture groups.
\dany digit (0-9)\wword character (letters, digits, _)\sany whitespace.any single character*zero or more of the preceding+one or more?optional (0 or 1){n,m}between n and m of the preceding^start of string (or line with m)$end of string (or line with m)[abc]any of a, b, or c[^a-z]anything BUT lowercase a-z(…)capture group(?:…)non-capturing group|alternation (or)
Ghi chú của biên tập viên
Understanding · Patterns, not literals.
Chương phân tích chuyên sâu này hiện chỉ có sẵn bằng tiếng Anh. Công cụ chuyển đổi ở trên hoạt động bằng ngôn ngữ của bạn; bài viết giải thích dài chưa được dịch.
Các câu hỏi thường gặp
Quick answers.
›Which regex flavor is used?
JavaScript regex (ECMAScript), evaluated by the same engine your browser uses. Matches PCRE for most common patterns but differs on lookbehinds and named groups.
›What flags can I use?
g (global), i (case-insensitive), m (multiline), s (dotAll), u (unicode), y (sticky).
›Are matches highlighted live?
Yes — every keystroke re-runs the regex and updates highlights immediately.
›Are capture groups shown?
Yes. Numbered and named capture groups are listed for each match.
›Is my input sent anywhere?
No — everything runs in your browser. Useful when testing regex against sensitive text.
›Is the regex tester free?
Yes — fully free, no signup.
Mọi người cũng tìm kiếm
Bài viết liên quan
Từ blog.(2)
Công cụ liên quan
More in this room.
- Regex PlaygroundHơn 100 mẫu được tuyển chọn cùng với công cụ kiểm tra trực tiếp.
- Bộ chuyển đổi viết hoa/thườngcamelCase, snake_case, kebab-case và nhiều hơn nữa.
- So sánh văn bảnSo sánh hai khối văn bản từng dòng.
- Bộ đếm từ và ký tựĐếm từ, ký tự, câu, thời gian đọc.
- Sắp xếp dòngSắp xếp các dòng theo thứ tự bảng chữ cái, theo độ dài hoặc theo số.
- Xóa dòng trùng lặpLoại bỏ các dòng trùng lặp trong khi vẫn giữ nguyên thứ tự ban đầu.