I'm relatively new to regex and in order to set up a goal in Google Analytics, I'd like to use a regular expression to match a URL containing both "thank-you
" and "purchaseisFree=False
" but exclude two specific rate plans that are represented in the URL as "productRatePlanID=5197e
" and "productRatePlanID=c1760
".
Here is a full URL example: https://www.examplepage.com/thank-you?productRatePlanId=5197e&purchaseIsFree=False&grossTotal=99.95&netTotal=99.95&couponCode=&invoiceNumber=INV00000589
I tried using this post as a model and created this regex:
\bthank-you\b.+\purchaseIsFree=False\b(?:$|=[^c1760]|[^5197e])
However, I'm not getting the desired results. Thanks in advance for any suggestions.