0

I am using the Google Analytics PHP API, and trying to use it to retrieve the most popular links on my website.

It works, but it retrieve some duplicates due to it retrieving URLs containing query strings. So basically, I want to retrieve all the links which do not contain the string "?start=" inside them. I think this can be done via regex (Google Analytics accepts regex filters), but don't know how.

Any ideas?

Thanks!

Shakil78692
  • 179
  • 1
  • 3
  • 10

1 Answers1

0

You can use negative look ahead regex assertion.

See http://www.perlmonks.org/?node_id=518444 and http://www.regular-expressions.info/lookaround.html

your_string(?!\?start=)
Gilles Quénot
  • 173,512
  • 41
  • 224
  • 223
MevatlaveKraspek
  • 2,246
  • 3
  • 20
  • 23