cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Help with regex for naming requests

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

3 REPLIES 3

janusz_dabrowsk
Dynatrace Pro
Dynatrace Pro

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.

dynatrace certificated professional - dynatrace master partner - Matrix Soft Ware Division - Israel

Featured Posts