Như mọi khi, chúng tôi cũng quan tâm đến ý kiến phản hồi nhận được. Trong số đó, chúng tôi nhận thấy có nhiều yêu cầu hoàn thiện tính năng này bằng cách thêm tùy chọn khớp phủ định vào bộ lọc biểu thức chính quy (regex).
Tin vui là bắt đầu từ hôm nay, bộ lọc cho Báo cáo hiệu suất sẽ hỗ trợ cả bộ lọc trùng khớp và bộ lọc phủ định không trùng khớp. Bạn có thể thấy tùy chọn này trong một trình đơn phụ thả xuống, trình đơn này xuất hiện sau khi nhấp vào tùy chọn "Tùy chỉnh (biểu thức chính quy)" trong bộ chọn bộ lọc, như minh họa trong ảnh chụp màn hình dưới đây. Tìm hiểu thêm về cách lọc dữ liệu về hiệu suất tìm kiếm.
Mẹo nhanh về cách sử dụng biểu thức chính quy trên Search Console
Chúng tôi nghĩ rằng bạn sẽ cần một số mẹo khi mới bắt đầu sử dụng biểu thức chính quy.
Trước hết, biểu thức chính quy là gì? Nói một cách ngắn gọn, đó là một chuỗi ký tự có vai trò chỉ định quy luật tìm kiếm. Từ đó, bạn có thể tạo bộ lọc nâng cao nhằm tìm kiếm hoặc loại trừ một từ/cụm từ và hơn thế nữa. Với biểu thức chính quy, bạn có thể dùng một số siêu ký tự, tức là những ký tự có ý nghĩa đặc biệt, chẳng hạn như để xác định một tiêu chí tìm kiếm. Hãy đọc tài liệu tham khảo về cú pháp của biểu thức chính quy RE2 để tìm hiểu về tất cả siêu ký tự mà Search Console hỗ trợ.
Nếu bạn muốn biết khi nào nên sử dụng biểu thức chính quy thay vì các loại bộ lọc khác, thì sau đây là một số ví dụ minh họa:
Chia phân khúc những người dùng đã biết thương hiệu của bạn – Hãy sử dụng biểu thức chính quy để chỉ định nhiều biến thể của tên công ty, bao gồm cả lỗi chính tả. Cách làm này sẽ cho bạn biết loại cụm từ tìm kiếm nào mà từng nhóm đang sử dụng và phần nào trên trang web của bạn đang thu hút từng đối tượng đó.
Ví dụ: nếu tên công ty của bạn là Willow Tree, thì bạn nên tạo bộ lọc cho mọi biến thể như: willow tree|wilow tree|willowtree|willowtee (siêu ký tự | đại diện cho câu lệnh OR).
Phân tích lưu lượng truy cập đến một phần của trang web – Hãy sử dụng biểu thức chính quy để tập trung vào các thư mục cụ thể trên trang web của bạn. Cách làm này có thể giúp bạn nắm được những cụm từ tìm kiếm phổ biến cho từng vùng nội dung của mình. Ví dụ: nếu cấu trúc URL của bạn là example.com/[product]/[brand]/[size]/[color] và bạn muốn xem lưu lượng truy cập dẫn đến sản phẩm giày màu xanh lục mà không quan tâm đến thương hiệu hoặc kích thước, thì bạn có thể sử dụng shoes/.*/green (.* sẽ so khớp với mọi ký tự, không giới hạn số lượng).
Hiểu ý định của người dùng – Hãy sử dụng biểu thức chính quy để phân tích loại cụm từ tìm kiếm đang đưa người dùng đến các phần trên trang web của bạn.
Ví dụ: nếu bạn quan tâm đến cụm từ tìm kiếm chứa các từ nghi vấn thì bộ lọc cụm từ tìm kiếm what|how|when|why có thể hiển thị những kết quả thể hiện rằng nội dung của bạn có thể dễ dàng trả lời câu hỏi (có thể thông qua mục Câu hỏi thường gặp). Một ví dụ khác là các cụm từ tìm kiếm chứa (hoặc không chứa) từ ngữ mang tính giao dịch, chẳng hạn như buy|purchase|order. Cách làm này cũng có thể hiển thị những tên sản phẩm thường dùng hoặc hiếm dùng trong những biểu thức đó.
Hãy truy cập trung tâm trợ giúp của Search Console để nắm được các biểu thức chính quy thông dụng. Nếu bạn có ví dụ thú vị nào về việc sử dụng biểu thức chính quy, hãy chia sẻ trên Twitter bằng hashtag #performanceregex.
[[["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"]],[],[[["\u003cp\u003eGoogle Search Console's Performance report now supports negative matching for regular expression filters, allowing users to exclude specific patterns.\u003c/p\u003e\n"],["\u003cp\u003eRegular expressions (regex) are sequences of characters used for advanced filtering beyond simple keywords, enabling analysis of various aspects of website traffic.\u003c/p\u003e\n"],["\u003cp\u003eRegex in Search Console can be used for tasks like segmenting users based on brand knowledge, analyzing traffic to specific website sections, and understanding user intent through query patterns.\u003c/p\u003e\n"],["\u003cp\u003eUsers can leverage the RE2 regex syntax and refer to Search Console help center for guidance on using regular expressions effectively.\u003c/p\u003e\n"]]],["The Search Console Performance report now supports both matching and non-matching regular expression (regex) filters via a secondary dropdown. Regex allows for advanced filtering using metacharacters, enabling users to segment branded traffic, analyze specific website sections (e.g., using `shoes/.*/green`), and understand user intent by filtering for question words or transactional terms (e.g `buy|purchase|order`). The document provides guidance, a link to the RE2 syntax, and encourages the sharing of regex examples.\n"],null,["# Search Console regex filters update and quick tips\n\nWednesday, June 02, 2021\n\n\nWe recently announced [improved data filtering](/search/blog/2021/04/performance-report-data-filtering)\nfor Search Console Performance reports, and we were delighted to see the [community\nreaction](https://twitter.com/googlesearchc/status/1379775388193320962) to the announcement.\n\n\nWe were also interested in the feedback we received, as always, and we saw many requests to complete the picture by adding a negative match option\nto the regular expression (regex) filter.\n\n\nThe good news is that starting today **the Performance report filter supports both matching and not matching regex filters** . The option\nis available through a secondary dropdown, which appears after picking the \"Custom (regex)\" option in the filter selector, as shown in the screenshot\nbelow. Learn more about [filtering search performance data](https://support.google.com/webmasters/answer/7576553#filteringdata).\n\n\nQuick tips on using regex on Search Console\n-------------------------------------------\n\n\nWe also thought it would be helpful to provide some quick tips if you're just starting with regex.\n\n\nFirst of all, what *is* a regular expression? In a few words, it is a sequence of characters that specifies a search pattern. You can use it\nto create advanced filters to include or exclude more than just a word or a phrase. When using regex, you can use a number of metacharacters, which are\ncharacters that have a special meaning, such as defining a search criteria. Check the [RE2 regex\nsyntax reference](https://github.com/google/re2/blob/main/doc/syntax.txt) for a reference on all metacharacters supported by Search Console.\n\n\nIf you're wondering when you should use regex as opposed to other filter types, here are a few examples when to use regex instead of other filters:\n\n- **Segment users that already know your brand** - Use regex that specify multiple variants of your company name, including misspellings. This will inform you what type of queries each group is using and which section of your website is attracting each audience. For example, if your company's names is `Willow Tree`, you might want to create a filter for all variants like this: `willow tree|wilow tree|willowtree|willowtee` (the `|` metacharacter represents an OR statement).\n- **Analyze traffic to a website section** - Use regex that focus on specific directories on your website, this can help you understand what are common queries for each of your content areas. For example, if your URL structure is `example.com/[product]/[brand]/[size]/[color]` and you'd like to view traffic leading to green shoes, but you don't care about the brand or the size, you might use `shoes/.*/green` (`.*` matches any character any number of times).\n- **Understand user intent** - Use regex to analyze which types of queries are bringing users to different sections of your website. For example, you might be interested in queries containing question words; a query filter `what|how|when|why` might show results that indicate your content should easily answer questions, maybe through an FAQ. Another example would be queries containing (or not) transactional words such as `buy|purchase|order`. This might also show which product names are more commonly or rarely used with these expressions.\n\n\nCheck the Search Console help center for [common regular\nexpressions](https://support.google.com/webmasters/answer/7576553#regexp_glossary). If you have any cool examples of what to use regex for, share them on Twitter using the hashtag `#performanceregex`.\n\n\nIf you have any questions or concerns, please reach out on the [Google Search Central Community](https://support.google.com/webmasters/threads?thread_filter=(category:search_console)) or on [Twitter](https://twitter.com/googlesearchc).\n\n\nPosted by [Daniel Waisberg](https://www.danielwaisberg.com), Search Advocate"]]