Skip to main content

New: RegEx filters

New: RegEx filters

Advanced Filters now supports regex (regular expression) matching, giving you powerful pattern-based filtering capabilities for your data.

RegEx Filters modal preview

With regex matching, you can create sophisticated filters that match complex patterns in your data. This is particularly useful for filtering pages, referrers, or other dimensions where you need more control than simple "contains" or "equals" matching.

Here are some practical examples of regex patterns:

Match specific pages:

^/(about|contact|pricing)$

Matches only /about, /contact, and /pricing pages.

Match pathnames and anything after:

^/(about|contact|pricing)

Matches /about, /contact, /pricing and any paths that start with these (like /about-us, /contact-us, /pricing/plans).

Match blog post patterns:

^/blog/\d{4}/\d{2}/

Matches blog URLs like /blog/2025/07/my-post-title.

Match subdirectories:

^/products/[^/]+/$

Matches product category pages like /products/electronics/ but not deeper nested pages.

Exclude certain pages (using the "not matching" operator):

^/(admin|login)

Matches all paths except those starting with /admin or /login.

RegEx filters work with both Advanced Filters and the API. Simply select "Matching (regex)" or "Not matching (regex)" from the filter type dropdown (or include them in your API filters query), enter your regex pattern, and apply it alongside your other filters. The regex engine use the standard regex syntax, giving you access to all the pattern matching power you need.

This enhancement makes Advanced Filters even more powerful for complex segmentation scenarios, whether you're analysing specific blog content, tracking campaign performance, or filtering out unwanted traffic. And one other awesome thing to note — you can effectively chain AND/OR operators within a single filter. For example, using ^/(about|contact|pricing)$ to match multiple pages at once, something that previously wasn't possible!

Jul 18, 2025

Return to changelog

Learn more about

Recent blog posts

Pixel cat

Switch to a better Google Analytics alternative

Fathom Analytics is simpler, more accurate and privacy-first. Import your Google Analytics data (UA and GA4), add our single line of code, and watch real-time analytics from your site pour in.

Start a 30-day, unlimited free trial to see how simple analytics can be.

Get started

Check out our full-featured, live demo to see how our software works.

Live demo