Regular Expression works in a local editor but not working with filter

8 views
Skip to first unread message

Angelo Chen

unread,
Nov 8, 2009, 2:15:20 AM11/8/09
to google-analytics-api - GA Data Export API
Hi,

I'd like to match page path 2, 5, 6 with this regular expression:

/4837[/|\n]

It works in a text editor, but when apply this to google data export
query for pagePath, it returns only 5 and 6, any idea what's wrong
with this? Thanks.

A.C.



1.Page Path = /4803
2.Page Path = /4837
3.Page Path = /48372
4.Page Path = /48372/123
5.Page Path = /4837/page1
6.Page Path = /4837/page2/123

chrissky

unread,
Nov 8, 2009, 12:02:17 PM11/8/09
to google-analytics-api - GA Data Export API
Use $ to match end of string. I'd also have ^ to make sure (if is what
you want) that it matches from beginning only

^/4837[/|$]

Angelo Chen

unread,
Nov 9, 2009, 2:23:04 AM11/9/09
to google-analytics-api - GA Data Export API
Thanks for the reply, but putting $ inside [] seems not working, any
idea?

chrissky

unread,
Nov 9, 2009, 10:24:26 AM11/9/09
to google-analytics-api - GA Data Export API
Perhaps

^(/4837|/4837/.*)$
Reply all
Reply to author
Forward
0 new messages