Menu

How to Use Regex in Google Search Console Like a Pro

Master Regular Expressions (Regex) in Google Search Console. Learn basic commands, include/exclude filtering, and when to use URL Clustering instead.

Kong Metrics Team3 min read

The standard filters in Google Search Console (“Queries containing” or “URLs containing”) are painfully limited. If you want to analyze multiple variations of a keyword or group several different subdirectories together, the basic filters fail.

To unlock the true filtering power of the GSC web interface, you must learn Regular Expressions (Regex).

The Limitation of Native Filtering

While Regex is powerful, it is not a complete analytics solution. The GSC UI is designed for quick, ad-hoc analysis, not for long-term reporting or building complex dashboards. To derive truly actionable insights from your search data, you need a way to build reusable, purpose-built reporting clusters.

Basic Regex Rules for GSC

Regex is a sequence of characters that specifies a search pattern. While it can get incredibly complex, mastering just three basic operators will cover 90% of your SEO needs.

1. The Pipe | (OR Operator)

The most useful Regex character is the pipe |. It acts as an “OR” statement.

  • Goal: See traffic for both your “shoes” and “boots” pages.
  • Regex: shoes|boots This returns any URL or query containing either word.

2. The Caret ^ (Starts With)

If you only want to see queries that start with a specific word (useful for finding question-based keywords).

  • Goal: Find informational queries.
  • Regex: ^how|^what|^why

3. The Dollar Sign $ (Ends With)

  • Goal: Find exact match directory paths without trailing extensions.
  • Regex: /blog/$

Include vs Exclude Filtering

The true power of Regex lies in combining it with the “Does not match Regex” filter.

For example, to analyze your pure Non-Branded traffic, you would set a query filter to Does not match Regex, and input ^yourbrand$|yourbrand. This instantly strips all branded variations out of the data table, revealing your true organic performance.

Regex vs. URL Clustering

While Regex is a powerful tool for quick, ad-hoc investigations within the GSC UI, it is a terrible system for long-term reporting.

GSC cannot save your Regex strings as named views. The filter stays in the report URL, so you can bookmark it, but each bookmark holds one view. Furthermore, you cannot place the data from Regex A next to the data from Regex B on a chart to compare them.

For permanent, macro-level analysis, you should move away from manual Regex and utilize URL Clustering within Kong Metrics.

Kong Metrics saves URL clusters with glob patterns and topic clusters with query rules.

For more advanced analysis, check out Google Search Console API vs UI, use Understanding GSC Data to interpret your metrics, and learn to manage your URL footprint with URL Clustering for SEO.

  • GSC tips
  • Data analytics

Published

Keep reading

More on GSC tips.

All articles

GSC tips · Data analytics

Data Sampling in SEO: Why 100% Accuracy is a Myth

Stop chasing perfect numbers. Learn how Google samples SEO data, why 100% accuracy is impossible, and how to use GSC API extraction for better analysis.

· 3 min

Read less. See more.

Kong shows your own Search Console clicks, impressions, CTR and positions, from 16 months back onward.

Choose which optional cookies we may use on kongmetrics.com and in the Kong Metrics App. You can change this at any time from "Cookie preferences" in the footer. Cookie Policy