Six RegEx Filters for GSC You Need to Know (Seriously)

If you have been on a mission to gain more insights into search behavior, you need to dive into the world of using custom regular expressions. By using custom regular expressions (RegEx) in Google Search Console (GSC), you can open up a new world of insights on user search behavior by filtering queries.

After seeing a post on X (formerly Twitter) we decided to make this guide containing various RegEx code for you to utilize.

How to Apply RegEx Filters in GSC

Basically, a RegEx is a series of literal and meta-characters that can be used to search for text. With that in mind, let’s start with the basics: Where to apply these filters. Once you are in Google Search Console, The process is as follows:

  1. Navigate to “Search Results” report under the Performance tab in GSC
  2. Click on “+ NEW” button located above the chart of queries
  3. Select “Query…” from the dropdown
  4. Choose “Custom (regex)” and enter one of the patterns listed below
    regex for search console
  5. Enter in any of the custom code mentioned below then hit apply to gain valuable insights.

Six Different RegEx Queries to Try to Up Your GSC Game

Now that you understand where to apply the filters, let’s get into the good stuff, which is the queries themselves. There are many different types of queries to try that can help you better understand how users are finding your content, all of which populate different results like location specific terms, question terms, and so much more.

Frequently asked questions

Code to copy: ^(who|what|where|when|why|will|was|can|does|if|is|do|how|should|could|did)

Many searches find information by using questions. This question-based RegEx code captures searches that start with common question words and can help you to search for patterns that involve questions.

By being able to see what questions are leading to impressions and clicks to your site, you can better understand how your blog content is performing, what types of questions customers are asking in the beginning of the buying journey, and can give you different ideas of FAQs you can answer on your website.

Specific keyword filter

Code to copy: (keyword1|keyword2|keyword3)

If you are looking for queries that have one or more specific keywords, you can add them into parentheses using bars to separate them. This helps you to better understand how users are searching for your specific products or services (or if they’re searching for something different and you need to pivot your strategy).

Multiple keyword exclusions

Code to copy: ^(?!.*?(keyword1|keyword2))

Say you are investigating a trend and want to leave a certain aspect of your business out of this search. You can do so using the keyword exclusion RegEx which excludes keywords that are specified by you. So for this one, be sure to select “Doesn’t match regex” from the dropdown when you are enabling the filter.

(For us personally, we always to exclude “meatloaf” and “strawberry milk” from our search terms report thanks to a certain billboard…)

Keyword variation capturing

Code to copy: \bbase(word)?s?\b

When you replace “base” with the root of your keyword in the formula below, you can find keywords that are close to the one you are searching for. GSC will pull the root word, its plural, and common derivatives.

Long-tail keywords

Code to copy: (\w*\W){#,}

Have you ever wondered if long-tail keywords will benefit your website? Or if the blog content you’ve written targeting them is actually leading to clicks? Use this RegEx to see the types of keywords that people are using to come to your site.

In this example, you’d replace the # sign with the minimum number of words you are looking for in your query. So, for a query of 4 words or more, you’d replace the “#” with “4”.

Local searches

Code to copy: ^(near|in \b\w+\b)

There are various ways Google can interpret local intent from user queries, but one of the easiest ways users get local results is when they include the word “near” in their search.

And if you have a lot of locations you need to filter out, you can also replace the “\b\w+\b” portion with a specific location to tailor it to your needs.

Remember that you can also combine filters for a more complex analysis. Combine any of the patterns for a deeper investigation of keyword searches.

Other Things to Check Out in Google Search Console

Using RegEx queries in GSC can help you to analyze search queries, identify trends, and better understand user intent. Don’t forget to experiment with different patterns and combinations.

Beyond RegEx queries, Google Search Console is useful for making conclusions about your audience and analyzing your website as a whole.

  • Insight into search performance – RegEx queries are used to help you draw conclusions about search behavior, but GSC as a whole can give you data on impressions, clicks, click through rates, and beyond.
  • Indexing – GSC has a section that reports on the index status of your website, which highlights issues that prevent your pages from appearing in search results. These crawl results can help you solve crawl errors or detect issues with sitemaps.
  • 404s and other status code pages – Google Search Console shows the amount of 404 pages on your website and allows you to review them. These pages are worth investigating and appropriately redirecting if you are trying to optimize your website for search engines.
  • Security issues – You can use GSC to alert you of any security issues detected on your website, which allows you to take quick action to protect your site.
  • Internal and external links – Navigate to the links tab in Google Search Console to see the external and internal links pointing to each page on your website. For example, when you sort these pages in ascending order, you can see which pages might benefit from having more internal links.

Other Related Posts to Check Out

Julia Grosel

About the Author

Julia Grosel

Julia Grosel is an SEO analyst at Sixth City Marketing. Her role focuses on optimizing digital content for clients in dentistry and higher education.

Our Partners & Awards