Close this search box.

5 Regex for SEO: A Guide for Non-Tech SEOs to Copy

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.

Table of Contents

Regular expressions are a game-changer for SEOs who know how to use them. Recently, I have started using them more with the help of ChatGPT.

This article is a guide for non-technical SEOs to up their game with a combination of Regex templates and using AI.

How to Use This Guide

In some cases, you only need to copy & paste the regular expressions in Google’s Search Console:

Custom regex in GSC

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.

Create a question regex with chatgpt

*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:


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.
Microsoft misspellings to create a regex in 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.

showing how to add a regex in the GSC

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:


You can change the numbers to find longer or shorter queries!


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:


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:


The above regex will bring questions of 8 words or more.

Find Keyword Groupings

Commercial Queries

If you want to export all the commercial queries from GSC or look at them as a group, you can use this regex:


This will group the queries that include:

  • Best
  • Top
  • Alternate
  • Alternative
  • Vs
  • Versus
  • Review

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.


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 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.

AGo6z5rmxkJIL90oe Znq0GSKuFYNSw2h2pR2hQ6SGnIAzmeHwyD4v8gPTr fNZXVqNw5bRwKUCXGf8AwUbYD4UW2ITmXzBGyE2VDtbX6ryEPcwsjwx5iz 8b8ZHjfzeuib1ERmi38Qb1CeMUBMoLI

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: 

And, if you want to take your knowledge to the next level, I do suggest taking a look at It also has a dedicated section on Regex!

Related Posts
The cover image of "What is attraction marketing" showing a human stick figure holding a magnet towards the title.

What is Attraction Marketing?

Attraction marketing is a modern marketing strategy that emphasizes building connections with potential customers by offering value and engaging content before promoting a product or

Read More »
Find all the country tier 1 lists in this article. The image is a cover depicting the globe and having the title "tier 1 countries" with an orange background.

Tier 1 Countries

When budgeting for ad campaigns for international businesses, advertisers tend to prioritize their spending to Tier 1 countries. These are the most valuable countries due

Read More »
Find all the country tier 3 lists in this article. The image is a cover depicting the globe and having the title "tier 3 countries" with an orange background.

Tier 3 Countries

Tier 3 countries in advertising are the least desirable, and are mostly developing economies with citizens that have limited or no disposable income. These are

Read More »