我正在使用Google Spreadsheets的Google AnalyticsAPI插件来提取数据。
我知道基本的正则表达式,结果是负面的回顾/不是运算符(我假设它们是相同的?)在Google Analytics中是不允许的,因此我对此过滤器有困难。
我想过滤掉所有包含查询字符串的网页路径。这是一个示例列表:
/product/9779/this-is-a-product
/product/27193/this-is-a-product-with-a-query-string?productId=50334&ps=True
/product/281727/this-is-another-product-with-a-really-long-title
/product/979
/product/979/product-12-pump-septic
/product/9790/the-1983-ford-sedan
/product/9791/remington-870-3-express-410-pump-shotgun
/category/2738/this-is-a-category
我希望我的输出为:
/product/9779/this-is-a-product
/product/281727/this-is-another-product-with-a-really-long-title
/product/979/product-12-pump-septic
/product/9790/the-1983-ford-sedan
/product/9791/remington-870-3-express-410-pump-shotgun
这是我的正则表达式的开始...
ga:pagePath=~^/product/(.*)/
...忽略第四行,但我不知道在第二次反斜杠后要放什么。
我在这里尝试了一些事情(比如这个Regular expression to stop at first match),并在此处测试我的代码(http://www.analyticsmarket.com/freetools/regex-tester)。
非常感谢任何见解!
答案 0 :(得分:0)
答案 1 :(得分:0)
答案 2 :(得分:0)