You will find this simple and silly Question but it is not. Please Guys help me here.
I have set of URLs in these two formats:-
https://lenskart.sg/collections/abc/products/xyz
https://lenskart.sg/collections/abc/xyz
I only need those URLs that contain the word "collections"(double quote to highlight the word) and does not contain the word "products"
How to write regex(Regular Expression) for this?
PS:- I need To filter out the URLs from Google Analytics using Regex. The Best expression I have come up till now is:- (collections/)(\w+)(/)(?!products) But Google Analytics is showing it as an Invalid Regex. It is working fine in other regex testing tool. May be Google Analytics is not accepting Negative Lookaheads. Here are Few URLs to support the same:- Google Analytics Regex - Alternative to no negative lookahead https://www.reddit.com/r/analytics/comments/5v6q4i/regex_expression_for_does_not_contain/ https://recalll.co/?q=negative%20lookahead%20-%20Google%20Analytics%20look%20ahead&type=code
Please Guys help me here. It's a big issue for me