Google Search Console adds the regular expression support in Performance Report that we SEO’s have waiting for.
This feature is very useful for the site owner, SEO’s to dive deeper into the analysis of the website. Which help’s with creating a more complex query and page-based filter.
It saves a lot of time for webmasters because before Regex we have to export the data to Google sheet or Microsoft Excel and then we can perform the analysis of that data.
But now we can do the same in Google Search Console(GSC) itself.
Do you know How To Use Google Trends for SEO Strategy!
Before we dig more in this, let’s start from scratch –
What is Regular Expression(Regex)?
A Regular Expression also knows as REGEX is a way to search through a string of text. It allows us to search through specific patterns in order to do things such as validation, or get certain terms and phrases, we can do advance finding with this or that option. There are tons of things we can do with Regular expression.
In simple words, it is an advanced way to search through the text, so that we can do many powerful things with the data available to us in the search console.
Where is Regex In Seach Console?
- Regex is available in the Performance Report
- Click on New
- Select the Query Option
- In filter, Click on the Dropdown menu and select the Custom(regex).
Check out our article on Image SEO (Image are super important they drive traffic if executed properly.)
Application of Regular Expression in Search Engine Optimization
Regex is a staple of search engines. It is extremely Powerful for identifying and extracting data from Google Search Console. In a nutshell, Extracting the data with this method helps to simplify and automate a lot of different SEO work.
Here is what it looks like:
Now both Google Analytics & Google Search Console have this feature to analyze the data in the dashboard itself.
Now, let’s start with How to use the Regex in the Search console.
Common Regular Expressions
Here are a few basic regular expressions :
|.||Matches any single character.”m.n” matches “men” and “man” but not “meen”|
|[characters]||Matches any single item inside [ ].”c[aie]t” matches “cat”, “cit”, and “cet””i[o0-9]n” matches “ion” and “i7n” but not “ian”|
|*||Matches the preceding letter or pattern zero or more times:”fo*d” matches “fd”, “fod”, “food”, and “foooooooood””https*://example” matches http://example” and “https://example”|
|+||Matches the preceding letter or pattern 1 or more times”fo+d” matches “fod”, “food”, “foooooooood” but not “fd”|
||||OR operator matches either the expression before or after the | operator.” New York|San Francisco” matches both “I Love New York” and “I love San Francisco”|
|\d||One digit 0-9″\d\d\d abc” matches “123 abc”|
|\D||Any non-digit (for example, any letter, or characters such as + or , or ?)”\D\D\D 123″ matches “aaa 123” but not “123 123”|
|\s||Any whitespace (tab, space)”1\s2\s3″ matches “1 2 3”|
|\S||Any non-whitespace.(\S)+ matches “fire” “and” “ice” in the string “fire and ice”, but none of the spaces, and not the whole string.|
|(?i)||At the start of your expression, allows case-insensitive matching.”(?i)HTTPS” matches “https”, “Https”, and “HTTPS””https” matches “https” but not “HTTPS”|
|^||At the start of your expression, limits matches to the start of the target string.”^example” matches “example” but not “an example””example” matches both “example” and “an example”|
Regular Expression For Search Engine
To use this Regex expression You have to Understand these Characters and use it in the custom Regex in the google search console.
Some of the use cases where you can use this is-
- Suppose if you want to find the keyword that begin with “SEO”
You’ll simply have to put “^” Character before the SEO and it will find all the keyword that starts with SEO.
Literally for an SEO Guy, it’s a time saver.
- If you are working with the brands and that particular website is getting a ton of branded search traffic.
Before the regex function, it was very difficult to find that analyse what users are misspelling but the intent was to search the brand.
So it’s very important to know what that misspelt term is.
So with the help of Regex Character, we can find this in one go.
You’ll simply have to put “|” Character, Brand Name|Misspelled Brand Name and so on and so forth.
“.” Character – The idea of this character is to matches anything.
When we use this character it will match anything that contains in the string.
- If you want to search a Queries with 2 or more Keyword .
With the help of “*” Regex, we can easily find the keyword containing your defined two or more keywords in the search string.
- If you want to find the Question search Queries
This Regex character is helpful if you are handling a huge website.
With simply apply this character you’ll find all the questions asked by the user.
The custom regex to find question queries is ^(who|what|where|why|how)[” “]
This are so many interesting uses of Regular Expression.
Regular expression matching is tricky, and an Invalid Regex expression will return no match.
To learn more about this check this guide Full RE2 Syntax Guide.
If you are looking for some Free SEO Tool?
Have a look on this – 10 Insane Free Tools for SEO’s
With this powerful function, we have more ways to slice and dice to help us get more with the performance report. This is the Ultimate time-saver for many SEO’s.
Hope you got something out from this!
If you did, share your experience in the comments section!