In some cases, you only need to copy & paste the regular expressions in Google’s Search Console:
In other cases, you need to make a list of the specific keywords you need. If you can’t change the regular expressions yourself, use ChatGPT and give it the instructions for the regex.
*ChatGPT’s free version of 3.5 is enough, no need to upgrade.
**You might need to specify a second time that the regex should work on GSC or try a couple of variations to work.
Brand Searches
This is my favourite regex to use. It can easily split your queries into branded and non-branded keywords.
This allows you to view the brand lifts of events or seasonal drops.
Let’s take an example of a big brand like Microsoft, the brand query would look something like this:
.*Microsoft.*|Micro*soft.*|micros.*|m*soft.*
How to create a Brand Regex for GSC with ChatGPT
Use your homepage as a filter.
Export all the keywords from the GSC.
Sort them by the search volume.
Filter the branded keywords & misspellings.
Feed them to ChatGPT.
I used 20 misspellings of Microsoft to do this, your regex will probably look different.
Branded vs Non-Branded
Remember to use “Matches regex” for the branded term.
Using “Doesn’t match regex” will give you the non-branded terms.
Short-Tail or Long-Tail Queries
Do you want to target long-tail queries and opportunities?
You can always use regex to filter your GSC keywords into long-tail and short-tail.
Use this regex for long-tail queries of 8 words or more:
([^” “]*\s){7,}?
Or, this one for short-tail queries of 1-4 words:
^(?:\b\w+\b\s*){1,4}$
You can change the numbers to find longer or shorter queries!
Questions
Are you looking for ideas for articles?
Your GSC might have the answer … or the question, with question queries you might be ranking in the second and third pages.
There is an easy way to find all the question queries in your GSC, and that’s the following regular expression:
^(Who|What|When|Where|Why|How|Can|Do|Is|Are)\b
Just copy and paste it!
Longer questions
Short questions are usually more difficult to rank for. You can customise the regex to bring the long-tail questions only:
You can change the words and replace any with another one, or add more by using | and then writing the word.
Or, you can feed ChatGPT your commercial queries and ask it to create a Regex for GSC that will match those and similar ones for you..
Product IDs or SKUs
Let’s say you want to view the performance of an ecommerce store, a specific series of products, or multiple products.
The products may be in multiple URLs and their IDs or SKUs look like these:
A123
A999
A235
PR097
PR278
ABC234
ABC 987
ABC091
I asked ChatGPT to write the regex to find these and similar product pages with different numbers.
^(A\d{3}|PR\d{3}|ABC\d{3}|ABC\s?\d{3})$
This regex is to be used in the page filters.
Other Groups
You can do the same as above to group searches or pages that are related in any way you like. Here are a few ideas:
Colours: Red, green, blue, yellow
Clothing items: Shoes, t-shirts, pants
Categories: Guides, How-tos, Templates
Misspellings
Misspellings are done similarly to Brand searches but for non-branded keywords.
Collect all the misspellings you can find in your search console or ask ChatGPT for possible misspellings of a specific word. Then, ask it to create a regex that can find all those misspellings.
Let’s Make Some SEO Magic
These are only a few of the possibilities where you can use regular expressions to filter queries through Google’s Search Console.
If you want to learn more about Regex for SEO, I suggest the following articles which helped with some ideas while writing the article, and are a good beginner’s guide on Regex:
I am Nick, a B2B & SaaS marketer with a focus on SEO, content, and techstack marketing
I created the Marketing Experts Hub to simply explain marketing, cover business topics, and software for marketers with a pinch of opinion.
If you want to stay in touch and learn more, sign-up to my newsletter and follow me on LinkedIn, where I post interesting my learnings and interesting industry news.