用于从 Google Analytics 中的着陆页列表中获取特定页面的正则表达式

Regular expression to get specific pages out of a list of landing pages in Google Analytics

在 Google 分析中,我需要 select 我的客户运营的每家酒店的登录页面。酒店页面由字符串 /hotels-in-XYZ/.

标识

酒店示例列表:

/XXX-one/login/
/hotels-in-ranthambhore/
/hotels-in-jaipur-resort/
/hotels-in-morocco-marrakech/
/about-us/
/hotels-in-mumbai/
/hotels-in-bengaluru/
/hotels-in-agra-resort/special-offers/extended-stay-offer/
/hotels-in-shimla/amp/
/hotels-in-udaipur-resort/amp/

我不太熟悉正则表达式,我一直在谷歌上寻找解决方案。我最接近的是 .*?\/hotels(.*)\/.* 但它不排除像 /hotels-in-shimla/amp/

这样的页面

您的帮助将不胜感激。如果我需要 post 任何其他信息以更好地解释问题,请告诉我。

^\/hotels-in-[\w\-]+\/$对你有用吗?

我在 https://regex101.com/r/9c2IRC/1/

测试了这个