In SEO Last updated:
Share on:
Cloudways offers managed cloud hosting for any size business to host a website or complex web applications.

Google Search Console, or GSC, is a powerful weapon in the hands of SEO specialists🧑‍💻 in interpreting the performance output of a website.

The introduction of REGEX has enhanced the way to get useful insights from the content and, at the same time, generate new ideas for creation.

The REGEX feature was much awaited for web analytics. It allowed filtering peculiar elements from any URL, which was otherwise difficult or impossible.

Here, I am bringing your attention to the tips and tricks to use REGEX on Google Search Console. You will also learn about the different sets of operators to be used in combination with REGEX codes to get the desired interpretation.

REGEX or Regular Expression: An Overview

Google Search Console is an entirely free service offered to webmasters with the purpose of managing website performance. It provides detailed reports about a website’s click-through rate, impressions, clicks🖱️, and keyword rankings, which is utilized in understanding the success of SEO campaigns.

However, there were limitations in filtering a URL’s success rate. GSC allowed exporting a maximum of 1000 rows for analysis. It was only possible to filter specific sections in a URL, such as defining the path, domain property, or prefixes, while complex strings and variations were missing.

Regular Expression or Regex is an effective addition to GSC. The purpose is to provide a system where SEO experts can use the GSC to find out more insights about a website’s working and performance.

Regex enables finding out critical SEO details of a website by applying these codes on Pages or Query filters. The codes consist of metacharacters enclosing a string related to the filtering parameter. As you enter the Regex on the panel, it displays the result, which you can save for reference.

Advantages of Using Regex on GSC

The purpose of working on Google Search Console is to analyze the website from a technical point of view. The SEO team works with many such tools and techniques for an optimization strategy by which the website ranks high📈 on search engines and generates traffic.

Regex provides an additional benefit by easing the process of gathering useful data, which can be further utilized for improvising the optimization plans. Here is what you can interpret with the Regex report.

✨ By using Regex codes on queries, you can find out the volume of searches on specific keywords/ phrases. This will help you create new content ideas for your blog and generate more traffic.

✨ Regex codes save a lot of time for SEOs working in big firms and dealing with huge volumes of web data. It only takes a few metacharacters and strings in the correct syntax to sort queries or pages for particular requirements.

✨ One of its major advantages is working on a typical combination of words, sentences, and URLs. These characters need to be placed in the right sequence to form a workable Regex code.

✨ Undoubtedly, it delivers better insights about your website, which includes high-performing and under-performing pages, along with the trends.

✨ You can apply the Regex codes on custom reports to track the traffic flow on webpages for particular queries. Later, you can instruct the team to work accordingly in a specific direction.

You can set multiple combinations of Regex characters to define a code and use it to interpret a solution for optimizing your website.

Where to Apply Regex on Google Search Console?

To use the Regex feature on GSC, you primarily need access to the ownership of your website. It is a compulsive condition since you won’t be able to attach it as your property on Google Search Console for any other analytical procedure.

You need to log in to the Google Search Console with your Gmail ID and start off by adding the property from the option given in the sidebar. Property is the website that you own or possess permission to access on the console.

Once you add the website or any URL in the given option, the panel will request you to verify✅ it. The verifying procedure is listed in the column, and once it is done, you can select your property for further procedures.

Under the listed property name, click on the “Performance” parameter and hit the “New” button above the graph for filtering options.

You can choose Query or Pages to use Regex code for filtering results.

Explaining the Regex Characters

There are multiple sets of characters used as Regex in filtering queries and pages on Google Search Console. Each metacharacter represents a different meaning on the filter. If you understand them well, then it won’t be difficult to perform an analysis on GSC using Regex.

Here, in the chart below, I have explained some symbols and characters used in Regex code with a suitable example.

CharactersUsage
()These parentheses are used for grouping characters or expressions, also known as capturing groups.
(Geek)You will get all the web pages with the word “Mobile” at the beginning of the title or tag. [^\mobile] If backslash follows caret, it will filter URLs with the given word mobile.
 
|This is an OR symbol simply used to apply choices in the code.
Mobile|PCThe report will fetch all the pages with any of the two words.
 
^The caret symbol will only match the word or phrase at the beginning of a string.
^MobileYou will get all the web pages with the word “Mobile” at the beginning of the title or tag. [^\mobile] If backslash follows caret, it will filter URLs with the given word mobile.
 
$The dollar symbol will only match the word or phrase at the end of a string.
Mobile$You will get all the web pages with the word “Mobile” at the beginning of the title or tag. [^\mobile] If backslash follows caret, it will filter URLs with the given word mobile.
 
.A period symbol is used for matching any single character in a string.
to.You will get all the web pages with the word “Mobile” at the end of the title or tag.
 
\The backslash is used for skipping the literal meaning of characters.
\dThis will match pages with digits 0-9.
 
[xyz]This RegEx code will match the query with one or all of these characters in the bracket; x, y, or z.
Mobile[xyz]The code will match with pages having all the words in a combination of mobile with x, y, or z, such as mobilex, mobilezy, and mobilezxy.
 
[c-m]This RegEx code will match the query with any lower-case or upper-case letter falling between c and m.
Mobile[c-m]The code will match with pages having all the words in a combination of mobile with letters between c and m; such as, mobilecjg, mobileeel, mobilecdf.
 
[3-7]This RegEx code will match the query with numbers falling between 3 and 7.
Mobile[0-9]The code will match with pages having all the words in combination of mobile with numbers between 3 and 7; such as, mobile73, mobile654, mobile445.
 
[\w]This will match every word on the webpages with the letters “to” like towards, into, to.
[\w]*Mobile[\w]Backslash followed by the letter “w” in lowercase inside the bracket. This will match any word or character, such as letter (both lowercase and uppercase), number, or underscore.
 
[\W]This Regex code will match pages having the word “mobile” with other words, whether in title, meta, or the article, such as mobilephone, mobileapp
[\W]*Mobile[\W]Backslash followed by letter “W” in uppercase inside the bracket. This will match everything excluding letters, or numbers. It means blank space characters, and symbols such as; ?:#@$%.
 

You can make multiple codes with these characters to filter complex queries on GSC.

Specific Regexes on Google Search Console

You can use the metacharacters on Google Search Console to make unique patterns or codes to fulfil specific purposes. Here are some of them, which you can try on your GSC portal.

🔶 ^[\w\W\s\S]{70,}$

Sequentially, the code will match all the words, numbers, non-word or special characters, symbols, white space, and non-white or new lines on the page. While the quantifier “70” signifies that the string is long or at least 70 characters.

Example: These types of codes are applicable in verifying passwords, sort product lists with elaborated description, or elsewhere.

🔶 (\w+\s){6,}\w+

This Regex code has three sections. It aims to match words and numbers with spaces between them. Therefore, the code will fetch the strings that are at least 6 words or longer, such as this sentence; “The strings that are at least 6 words or longer.”

Example: These codes are applicable in filtering articles with longer titles, longer social media comments, etc.

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

This Regex code is simple and quite beneficial for bloggers and SEO experts. It is easy to understand that it will match all the queries on search engines that begin with any of these words; who, or what, or where, and others in the parentheses. The string should begin with any of these words, followed by a space. Therefore, it will not fetch words like, “however”, “whole”, etc.

Example: These codes are suitable for understanding market trends and users’ discussions to get new content ideas.

🔶 “who|what|where|when|why|how”

It is similar to the Regex code discussed above, but here, the function will match all the strings that contain any of these words, regardless of whether the string begins with these words or not.

Example: The code is suitable for highlighting questionable statements, filtering user inputs, etc.

🔶 .*

The metacharacter period followed by an asterisk is often termed a wildcard expression because you can use it to match any specific string by putting it under this code.

Example: The Regex .*Android.* will fetch all the pages on your property that contain the word Android. By directly using the code .* on the filter, it will extract all the pages appearing on the search engine in a month.

🔶 [^\/\.\-:0-9A-Za-z_]

A caret symbol is followed by a backslash, which will exclude the characters instructed in the code. Here, the code will match with strings that do not have forward-slash, digits, period, colon, hyphen, and all the alphabets in both upper-case and lower-case.

Example: Therefore, the code is applicable in capturing URLs, meta descriptions, or content that has special characters like &%$@.

🔶 ?i)(((is|are).(brand|site|company)|(brand|site|company).(is|are)).*(scum|reliable))

It is a long Regex code with specific sections. The character “?i” used at the beginning of the code is for a case-insensitive flag. It means that the code will match the strings irrespective of them being upper-case or lower-case. The parentheses following it contain some words separated by pipe (OR) characters.

The Regex code will detect the queries irrespective of the letter cases implied, which include the words is or are, brand, company, or site, along with scum or reliable.

Example: This Regex code can be carefully used in finding the pattern of customers’ queries. You will be able to know if your website has positive or negative reviews.

🔶 (kwd1|kwd2).*

It is a simplified usage of disjunction regex code where the GSC will filter out pages or queries that either the word kwd1 or kwd2, followed by any other letter or number.

Example: You can use the pattern to extract pages on your website that have any of these words connected with other words or numbers in the URL, title, meta, or content.

🔶 (Keyword1 AND Keyword2)

This code is a clear example of conjunction expression. “AND” is an operator used in the Regex code. It is used to get pages that have these two given words in the same sequence.

Example: You can apply the code on GSC to get pages, title, or meta with two specific words in the same order.

🔶 “keyword1 keyword2”

The code is suitable for matching a phrase or an exact order of words on the web page.

Example: Apply the code on GSC to find out pages with title, description, or content that contains a specific phrase.

🔶 (Keyword1 | Keyword2)

This code has two words and a pipe character. It signifies that the GSC will display pages of your website that have either the “Keyword1” or the “Keyword2” but not both.

Example: Apply the code to extract pages from your website that have any one of the two or more words separated by the pipe character.

🔶 (Keyword1)\b(Keyword2)\b

This Regex code has two specific words with the character “\b” which is a symbol for word boundary. It will provide pages with these two words and no other word, digit, or character in between them.

Example: Use this code on your GSC filter to know about pages that have two separate words in continuation.

🔶 (Keyword1)\w+(Keyword2)

The code includes two words with metacharacter “\w+” in between, where “w” is in lower-case. Therefore, it will fetch all the pages that contain these two words, whether in title, description, or content, irrespective of the number of words in between them.

Example: You can apply this code to extract all the pages on your website that at least contain these two words anywhere in the title, content, or meta.

🔶 (Keyword)\bphrase

It is a simple Regex code to match the string with the word in parentheses and followed by the word phrase. The metacharacter “\b” signifies word boundary or no other character in between the given words.

Example: This Regex code on your GSC will deliver pages that have the given words in series anywhere in the article, such as “keyword phrase.”

🔶 a-url.|.b-url.|.c-url.|.e-url.|.f-url.|.g-url.|.h-url.|.i-url.|.j-url.|.k-url.|.l-url.|.m-url.|.n-url.|.o-url.|.p-url.|.

This Regex code lists multiple URLs “a,b,c,e,g…..” separated by the pipe character. Therefore, it will filter out strings with any one of these URLs.

Example: You can apply such patterns on your GSC panel to get webpages that have any specific URLs in the title or article.

🔶 ^(apple|ball|cat|duck farm)$

The given code implies matching the beginning of a string with one of these given words, “apple, ball, cat, or duck farm” because the pipe character separates them. While it also ensures to have no other word or character.

Example: You can use the code to get details about pages that have any specific keywords in the beginning.

🔶 .*\/$

The given Regex code aims to capture every string, whether words or numbers, but it should end with a forward slash.

Example: You can use it to match the pages that have URLs ending with a forward slash.

🔶 .(best|top|vs|review).*

This code will match strings that have a period in the beginning along with one of the given words (separated by a pipe character) and other words, numbers, or special characters in continuation.

Example: You can use such patterns of Regex in commercial reports to understand the market trends.

🔶 (buy|cheap|price|purchase|order).

This code will match strings that have one of the given words separated by a pipe character and followed by other words, numbers, or characters.

Example: Such codes are useful in matching transactional searches or queries related to your website products.

🔶 (face(b|be)ook)        🔶 (f(a|e)ce(b|be)ook 🔶 (fa(c|s)(e|i)book)

These codes have a combination of words inside parentheses along with pipe characters in between them.

The first Regex will match the strings that have the word “face” followed by “b” or “be” and ends with “ook”. So, the fetched pages will have the word facebook or facebeook.

The second Regex will match the strings that have the word “f” followed by “a” or “e” followed by “ce” followed by “b” or “be” and ends with “ook”. So, the fetched pages will have any one combination, such as facebook, fecebook, facebeook, or fecebeook.

The third Regex will match the strings that have the word “fa” followed by “c” or “s” followed by “e” or “I” and ends with “book”. So, the fetched pages will have any one combination, such as facebook, facibook, fasebook, or fasibook.

Example: You can use such codes to match potential misspellings in your web pages.

🔶 .wp-.

The given code will match the strings having a period followed by “wp-“followed by other characters.

Example: It is suitable for extracting pages with WordPress URLs.

🔶 .*/url-1/.* vs .*/url-2/.*

The given code has two different URLs with a compare Regex character. It will fetch two specific URLs from your website to compare their metrics.

Example: You can apply this code to compare the traffic, user-turnup, and other progress between two specific web pages on your site.

Other Uncommon Regexes

🔺 (?i)\bkeyword\b

This code will match a string that has the word “keyword.” The search is irrespective of the case sensitivity of the word in webpages.

🔺 “phrase”

This code will simply match the pages that have the word phrase in it.

🔺 \w{5}

The code will match queries that have 5-word characters.

🔺 \d{3}

This code will match queries that have exactly 3 digits.

🔺 ([^” “]*)

This Regex code will match strings that do not have any characters in quotation marks.

🔺 (?i)\b(keyword1|keyword2|keyword3)\b

This given code will match the strings that have any one of the words separated by a pipe character and in any or upper-case or lower-case.

🔺 \W+

The code will match any number of non-word characters, usually special characters.

🔺 \d{3,5}

The code will match all the strings that have numbers of 3 digits and a maximum of 5 digits.

🔺 \b\w+\b

The code will match any number of word characters with word boundaries.

Final Words

Google Search Engine has become a source of vast information after introducing Regex codes in the performance filters. All it requires is an understanding of the structure of codes to extract the analytical reports.

You can make several Regex codes on your panel to get peculiar details about your website’s performance and use them to improvise for better results.

Next, check out Google search tricks to help you become better at online search.

Share on:
  • Nitesh Malviya
    Author
    Nitesh Malviya is a proficient writer who delivers credible and unique write-ups in multiple genres. He writes authoritatively producing well-researched and optimized content depicting the reader’s perspective. A Computer Sc. Engg….
  • Rashmi Sharma
    Editor

    Rashmi is a highly experienced content manager, SEO specialist, and data analyst with over 7 years of expertise. She has a solid academic background in computer applications and a keen interest in data analysis.


    Rashmi is…

Thanks to our Sponsors

More great readings on SEO

Power Your Business

Some of the tools and services to help your business grow.
  • The text-to-speech tool that uses AI to generate realistic human-like voices.

    Try Murf AI
  • Web scraping, residential proxy, proxy manager, web unlocker, search engine crawler, and all you need to collect web data.

    Try Brightdata
  • Monday.com is an all-in-one work OS to help you manage projects, tasks, work, sales, CRM, operations, workflows, and more.

    Try Monday
  • Intruder is an online vulnerability scanner that finds cyber security weaknesses in your infrastructure, to avoid costly data breaches.

    Try Intruder