The Power of RegEx in Google Search Console

Are you a marketer or SEO looking to level up your data analysis game?

Look no further than regular expressions, or RegEx, in Google Search Console.

This powerful tool allows you to build advanced filters and unlock valuable insights from your query and URL data.

Trust us, once you start using RegEx, you won’t be able to go back.

But what exactly is RegEx?

Invented by Stephen Cole Kleene in the 1950s, regular expressions are sequences of characters used for searching and manipulating text.

They use metacharacters and literal characters to perform complex pattern matching.

For example, \s matches whitespace, while \S matches anything that isn’t whitespace.

So why should you care about RegEx?

Well, it allows you to filter multiple values simultaneously, making it quicker and easier to uncover valuable queries that can optimize your existing content or inspire new pages on your site.

And with RegEx support now directly within the Google Search Console user interface, you can run advanced filters and queries directly within the tool, saving you time and effort.

But don’t let the steep learning curve intimidate you.

While RegEx may seem daunting at first, the benefits it offers are well worth the effort.

With RegEx, you can

  • create custom filters and segments that provide deeper insights into your website’s performance and user behavior.
  • identify trends in user behavior that might not be apparent through simple query filtering alone.
  • do data cleanup, allowing you to consolidate variations of keywords into a single group for more accurate analysis.
  • analyze specific queries or keywords with a complex structure.
  • see how you stack up against your competitors

One of the best things about RegEx is its flexibility.

Number one reason why choose RegEx over other filters in Google Search Console?

Well, the default filters have their limitations. You can only filter one URL, one keyword, or one country at a time.

With RegEx, you can get creative and write expressions for your specific use case, allowing for more powerful and versatile filtering options.

Now that you understand the power of RegEx, let’s dive into how you can use it in Google Search Console.

  • First, head to your Google Search Console account and navigate to the Performance Report.
  • Click on the “+ New” button in the Filter Options and select either the “Query” or “Page” filter.
  • Next, choose the “Custom (regex)” option from the drop-down menu.

Now, it’s time to unleash your RegEx skills and write or paste your expression into the designated text area.

It’s that simple! Try the below examples:

Filtering Countries: You can use RegEx to filter data by country. For example, if you want to filter data for all users in the United States, use:


Filtering Devices: filter data by device type. If you want to filter data for all users on mobile and tablet devices, you can use the following Regex code: 


This formula will match any URL that contains the word “artificial”.


This expression will match any URL that exactly matches the word “vikinglinks”.


This will match any URL that starts with “/category/”.


This expression will match any URL that starts with “https://www.example.com/”.


This will exclude any URL that contains the word “blog”.


This formula will match any country code that consists of two uppercase letters, such as “US” or “NL”.


This will show you all the queries with 4 or more words. This can be used to find long-tail keywords.

([^” “]*\s){3,}? 

This formula will return URLs with a similar ending. Use it to find all URLs that end with “…-contact”.


Great for finding queries with commercial intent:


Looking for queries with transactional intent?


Just copy and paste this regex into your Google Search Console queries:

^(who|what|where|when|why|how)[" "] 

Voila! You’ll instantly get a list of all the question-based queries you’re ranking for.

You can play around with it. Add some words your customers are using:

^(who|what|where|when|why|how|was|did|do|is|are|aren't|won't|does|if)[" "]

It’s like having a direct line to your audience’s burning questions!

Plug in this custom RegEx if you are a software company/ SaaS business:


This will find keywords that may have bottom and middle of the funnel intent for your website.

Regex hack to extract MORE keywords within your search console data.

Let’s say you’re working with a solar panels website, and you have the keyword ‘solar panels’, and want to see related terms.

If you search GSC for just ‘solar panels’, it will return all keywords containing the 3 words, in that order:

solar panels
home solar panels
buy solar panels

It is not how people are actually searching many times.

What if ‘home solar panels’ isn’t the right order for those words, or there are terms in the middle?

Here is a regex to use in this case:

^((.*? )?(solar|panels)( |$)){2}.*$

The rule will force all 2 to match.

Using REGEX in Google Search Console is kind of like having keyword-research superpowers.

If you’re serious about optimizing your website’s performance and gaining valuable insights from your query and URL data, don’t sleep on RegEx.

It may require some learning and experimentation, but the rewards are well worth it.

So go ahead, unleash the power of RegEx in Google Search Console, and take your data analysis to the next level.

And if you need any assistance or want to learn more about how VikingLinks can help you harness the full potential of SEO.

(Advanced) Unlock the Power of Regular Expression Filters

Build your own custom filters using this cheat sheet below.

You need to know some of the characters used in regular expressions:

  1. . (dot) – This clever little character matches any single character except a line break. It’s like a wildcard that can represent any letter or symbol. Imagine it as the Sherlock Holmes of regular expressions, always ready to solve the mystery of the missing letter.
  2. ^ (caret) – No, this isn’t a gardening tool! In regular expressions, the caret is used to match the start of a line. It’s like a detective’s magnifying glass, helping you search for clues right at the beginning.
  3. $ (dollar sign) – Don’t worry, we’re not talking about money here. In regular expressions, the dollar sign is used to match the end of a line. It’s like the final piece of evidence that completes the puzzle.
  4. [ ] (square brackets) – This dynamic duo is used to create character classes. You can specify a range of characters within the brackets, and the regular expression will match any single character from that range. It’s like having a team of detectives with different specialties, each assigned to a specific task.
  5. * (asterisk) – This star of regular expressions matches the preceding character or group zero or more times. It’s like having a detective who never gives up, tirelessly searching for any occurrence of the suspect.
  6. + (plus sign) – This symbol matches the preceding character or group one or more times. It’s like a detective who knows that one clue isn’t enough and keeps digging deeper for more evidence.
  7. ? (question mark) – No, this isn’t a riddle. In regular expressions, the question mark makes the preceding character or group optional. It’s like a detective who investigates all possibilities, even considering the absence of a clue.

These are just a few of the characters used in regular expressions.

There are many more, each with its own unique role in the investigation.

Now that you have a taste of the regular expression world, you might be wondering how to put them into action.

That’s where VikingLinks comes in!

We specialize in harnessing the power of regular expression filters to solve complex data challenges.

Whether you need to extract specific information from a large dataset, validate input fields on your website, or transform the text into a desired format, our team of expert detectives is here to help.

With VikingLinks, you’ll unlock a world of possibilities and turn your data mysteries into success stories.

So, what are you waiting for? Contact VikingLinks today and let us guide you on your regular expression journey.

Together, we’ll crack the code and unleash the hidden potential in your data!

Remember, regular expressions may be serious business, but that doesn’t mean we can’t have fun along the way.

Join us in the quest for data enlightenment, where professionalism meets laughter!

Leave a Reply

Your email address will not be published. Required fields are marked *