26 Jun 2020
09:03 AM
- last edited on
25 May 2023
08:46 AM
by
Karolina_Linda
Hello Community!
I need to have regex for such referer strings:
https://xxxxxx.somewhereonmars.ru:9999/payment/create/calculate?pid=xxxxxxxxx
https://xxxxxx.somewhereonmars.ru:9999/validate/offer/rules?some_parameter=xxxxxxxxx
https://xxxxxx.somewhereonmars.ru:9999/payment/confirm/config?another_parameter=xxxxxxxxx
My regext looks like:
https://[a-zA-Z]+.[a-zA-Z]+.[a-zA-Z]+.[a-zA-Z]+:\d+(.*)/\b+
I expect:
/payment/create/
/validate/offer/
/payment/confirm/
For some reasons Dynatrace pointed that - "Please use possessive or lazy quantfilters whithin your capture group
Can anyone help me with fixing my regex?
Thanks.
Regards,
Alexander
Solved! Go to Solution.
Hi
First of all please validate your regex in tool like https://regex101.com/r/KyEbyM/1 first.
I think regex https?:\/\/[^\/]*+(\/[^\/]*+\/[^\/]*+\/) meet your needs.
It works.Janusz, thank you for fast response.
There is also dynatrace regex tester that you can use.