为什么我的 Regex 包含过滤器不起作用谷歌分析?

问题描述

在谷歌分析中,我创建了以下包含过滤器:

operator<=>

为了包含包含以下地址的网址:
https://my.tase.co.il
https://accounts.tase.co.il
https://maya.tase.co.il/reports/mymessages
https://maya.tase.co.il/reports/favorites
https://maya.tase.co.il/account/notification
https://info.tase.co.ilManagement/GeneralPages/Pages/PersonalFolder.aspx
https://info.tase.co.ilManagement/GeneralPages/Pages/Registration.aspx
https://info.tase.co.ilManagement/GeneralPages/Pages/Change_Password.aspx
https://info.tase.co.ilManagement/GeneralPages/Pages/UsersSearchIndex.aspx
https://info.tase.co.ilManagement/GeneralPages/Pages/Security%20Search.aspx

但由于某种原因我无法让它工作。 我做错了什么?

感谢您的帮助!

解决方法

该模式与以 info. 开头的链接不匹配,因为该模式指定了 info\..*\/(heb|eng),并且在示例数据中不存在 hebeng。>

您可以remove that part或使用以这些网址开头的完全匹配的模式:

https:\/\/(?:(?:accounts|my)\.tase\.co\.il|maya\.tase\.co\.il\/(?:reports\/(?:mymessages|favorites)|account\/notification)|info\.tase\.co\.il\/Management\/GeneralPages\/Pages\/(?:PersonalFolder|Registration|Change_Password|UsersSearchIndex|Security%20Search)\.aspx).*

看到一个 Regex demo