regex in Dynatrace to grab last item from /item1/item2/last_item

Hello,

Without getting greedy (-; who knows how to solve below,

/item1/item2/last_item  should transform to last_item

Who can solve this, non greedy (and yes I know it is a lame joke)

KR Henk

The following should work, does it?

/([^/]*+)$

Hi Julius,

(you missed an escape so  change to ([^\/]*+)$   )

“Dynatrace says to expensive!”  but after a lot of tries it seems that the solution is super simple,

(when you see it (-:wink:

[a-z,A-Z]+$ (or a variation of course)

KR Henk

KR Henk

No, my regex ix fine I think. You need to specify the head / as without it it’s expensive. Also it depends on where within Dynatrace you are using it.
It works for the request naming rules (using the aaa placeholder):

RUM has different regex limits, so it’s better to ask where you need it exactly.

Hello Julius,

Customer was using regex in calculated metric, so you are right yours works perfect.

(except in calculated metric than mine is better (-:wink:

And yes I know that is very deep (-;

Thank for your reaction!

KR Henk