Thông báo: Tất cả dự án phi thương mại đã đăng ký sử dụng Earth Engine trước ngày 15 tháng 4 năm 2025 phải xác minh điều kiện sử dụng phi thương mại để duy trì quyền truy cập vào Earth Engine.
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
So khớp một chuỗi với một biểu thức chính quy. Trả về danh sách các chuỗi khớp.
Cách sử dụng
Giá trị trả về
String.match(regex, flags)
Danh sách
Đối số
Loại
Thông tin chi tiết
this: input
Chuỗi
Chuỗi cần tìm kiếm.
regex
Chuỗi
Biểu thức chính quy cần so khớp.
flags
Chuỗi, mặc định: ""
Một chuỗi chỉ định sự kết hợp của các cờ biểu thức chính quy, cụ thể là một hoặc nhiều cờ sau: "g" (khớp toàn cầu) hoặc "i" (không phân biệt chữ hoa chữ thường).
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2025-07-26 UTC."],[[["The `String.match()` method searches a string for a specified regular expression and returns a list of matches."],["It accepts the input string, the regular expression pattern, and optional flags ('g' for global match and 'i' for case-insensitive search)."],["If a match is found, the method returns a list containing the matching substring(s); otherwise, it returns an empty list."],["You can use various regular expression patterns and flags to control the matching behavior, including character classes, quantifiers, and anchors."]]],["The `String.match()` function searches a string (`input`) for matches to a given regular expression (`regex`). It returns a list of matching strings. Optional flags (`flags`) modify the search, such as 'g' for global matching or 'i' for case-insensitive matching. The examples demonstrate various regex patterns and flag combinations. The function returns an empty string if the pattern is empty, or list of matching strings when successful. The examples cover the use case for Javascript and Python.\n"]]