Skip to content

GSC - RegEx

Long-tail Keywords:

RegEx: ([^" "]*\s){7,}? 

Replace 7 with other numbers to get search queries as per the number of words.

Brand Name:

RegEx: aloak|jawali|alok|javali or .*brand.*

The | metacharacter represents an OR statement.

User Intent:

RegEx: what|how|when|why or buy|purchase|order or ^(who|what|where|why|how)[“ “]

Analysing types of queries bringing users to different sections of your website.

Specific Keyword:

RegEx: ^aloakjawali

 ^ Matches the beginning of the given words & followed by other words (like you relevant LSI keywords 

Informational:

RegEx: ^(who|what|where|why|how)[“ “]

Commercial:

RegEx: .*(best|top|vs|review*).*

Transactional:

RegEx: .*(buy|cheap|price|purchase|order).*

 

  • [ ] matches range of characters
  • ^ starts with
  • $ ends with
  • \w matches ASCII letter, digit, or underscore. It is the same as [A-Z a-z 0-9_]\g;
  • \s matches whitespace;
  • \W matches anything that is not an ASCII letter, digit, or underscores;
  • \S matches anything that is not whitespace.
  • {1,10} repetitions of patterns from 1 to 10 times.