News & Updates

Regular Expressions in Google Search Console

April 09, 2021 03:40:02 PM

Regular Expressions in Google Search Console

On July 6, 2020, Google announced that the Regular Expressions filter would soon be available on the Google Search Console performance report filters. Google has finally released this feature in the performance report filters to help site owners and SEOs get an additional filter to their performance report.

Regular Expressions in Performance Report

The site owner can use regular expression filters for user queries and page URLs.

  • The regular expression can match everywhere in the target string unless you use ^ or $ to require matching from the string's start or end, respectively.
  • You can use "(?i)" at the beginning of your regular expression string for case-insensitive matches. Example: (?i)https

Here are a few basic regular expressions:

Wildcard:
.
Description:

It matches any single character.
"a.d" matches "aed" and "aad" but not "aeed"

Wildcard:

[characters]

Description:

It matches any single item inside [ ].

"c[aie]t" matches "cat", "cit", and "cet"
"i[o0-9]n" matches "ion" and "i7n" but not "ian"

Wildcard:

*

Description:

It 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"

Wildcard:

+

Description:

It matches the preceding letter or pattern 1 or more times
"fo+d" matches "fod", "food", "foooooooood" but not "fd"

Wildcard:

|

Description:

OR operator matches either the expression before or after the | operator.
"Amman|Irbid" matches both "I love Amman" and "I love Irbid"

Wildcard:

\d

Description:

One digit 0-9
"\d\d\d abc" matches "123 abc"

Wildcard:

\D

Description:

Any non-digit (for example, any letter, or characters such as + or , or ?)
"\D\D\D 123" matches "aaa 123" but not "123 123"

Wildcard:

\s

Description:

Any whitespace (tab, space)
"1\s2\s3" matches "1 2 3"

Wildcard:

\S

Description:

Any non-whitespace.
(\S)+ matches "fire" "and" "ice" in the string "fire and ice", but none of the spaces, and not the whole string.

Wildcard:

(?i)

Description:

At the start of your expression, allows case-insensitive matching.
"(?i)HTTPS" matches "https", "Https", and "HTTPS"
"https" matches "https" but not "HTTPS"

Wildcard:

^

Description:

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"

In conclusion, big thanks to Google Search Console for launching this exciting feature, as I'm sure it's an excellent addition to help us get more with the performance report.

Automate Your Customer Journey

We can help you automate your customer journey (using HubSpot) to generate more leads, convert them to customers, and retain them longer.

Learn More »