DaFunkyAlex
DaFunkyAlex

Reputation: 1969

Google Analytics: exclude with regex

Although my regular expression works on regexr.com, Google Analytics does not accept it the way I want.

I have those urls:

/category/stuff382689,25090

and those:

/category/stuff382689,25090,,1
/category/stuff382689,25090,,2
...

But I only want to count the first one (without the double commas). I tried this regex:

^.*stuff382689,.*?\d.+[^,,]$

But Google gives me all of them, including the double commas

Upvotes: 0

Views: 332

Answers (1)

Michał M
Michał M

Reputation: 618

Try This:

^.*stuff382689,(\w+)$

Tested in notepad++ and regex101.

Upvotes: 2

Related Questions