I would like to create regex based on URL.Below is the URL format that should capture.
https://www.abc.com/smartphones/samsung-galaxy-s9-plus/?usrPrc=.edge-monthly-price#sku=sku1234 https://www.abc.com/smartphones/motorola-g7/?usrPrc=.edge-monthly-price#sku=sku2222 https://www.abc.com/smartphones/iphone-7/?usrPrc=.edge-monthly-price#sku=sku2222
I have tried this one but it was not working as expected [https://www.abc.com/smartphones/](.*)?usrPrc=.edge-monthly-price#sku=(.*) but in the middle because of .* it was taking someother urls also. for all the URL's until smartphone it was same and from ?it will be same until sku. can someone help me in fixing this.
Solved! Go to Solution.
I am really not good in the regex, therefore, if you found that the below regex is also not working for you then we will have to wait for someone to help us out.
I believe I could help you here.
First off, I'd suggest using the URI pattern value business transaction measure for your filter/result/split. On your measure properties - remember to select Custom URI and check the box for including the query string in the pattern.
You need to escape regexp characters like "?". Also, keep in mind that dot-start (.*) is an expensive regular expression and better to avoid it.
This regexp will provide a group match on the SKU. Is that what you wanted?