# Help Regex user actions

**URL:** <https://community.dynatrace.com/t/help-regex-user-actions/22704>\
**Category:** Real User Monitoring\
**Tags:** user-actions\
**Created:** [December 10, 2019, 10:56am UTC](https://community.dynatrace.com/t/help-regex-user-actions/22704 "2019-12-10T10:56:23Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![service\_apms](https://avatars.discourse-cdn.com/v4/letter/s/c4cdca/32.png) [@service\_apms](https://community.dynatrace.com/u/service_apms)\
**Post date:** [December 10, 2019, 10:56am UTC](https://community.dynatrace.com/t/help-regex-user-actions/22704/1 "2019-12-10T10:56:23Z")

</div>

Hello,

I need to configure a naming rule bt i can’t seem to do so with regex.

First of all Dynatrace managed Naming rules do not seem to accept Regex.

What i want to do is take any url with a certain value and remove what comes after a certain value.

Example :

Urlpath : /Example1/Example2/XXXXX =\> /Example1/Example2/

So take every url that contains Example2 and rmove what come after it

Does anyone have an idea on how i can do that ?

Thanks

---

<div class="post-metadata">

**Author:** ![AlexanderSommer](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/alexandersommer/32/2501_2.png) [@AlexanderSommer](https://community.dynatrace.com/u/AlexanderSommer)\
**Post date:** [December 10, 2019, 11:43am UTC](https://community.dynatrace.com/t/help-regex-user-actions/22704/2 "2019-12-10T11:43:36Z")

</div>

We have currently two user action naming versions out. If you are using already the new user action naming, you need to create a placeholder with /Example2/ as leading delimiter and without trailing delimiter:

 ![22848-useractionnaming.png](https://global.discourse-cdn.com/dynatrace/original/2X/4/49063fdbfda4c033daa2bfc99eaa3cd0d6a9bbcc.png)

You than can use this placeholder in a user action rule.

If your environment does not have the new user action naming, please reach out to your Dynatrace contact.

---

<div class="post-metadata">

**Author:** ![service\_apms](https://avatars.discourse-cdn.com/v4/letter/s/c4cdca/32.png) [@service\_apms](https://community.dynatrace.com/u/service_apms)\
**Post date:** [December 10, 2019, 12:03pm UTC](https://community.dynatrace.com/t/help-regex-user-actions/22704/3 "2019-12-10T12:03:35Z")

</div>

I did as shown but it adds the value (\<Removed\>) to the path

What rule can i use to fix this ?

---

<div class="post-metadata">

**Author:** ![skrystosik](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/skrystosik/32/21133_2.png) [@skrystosik](https://community.dynatrace.com/u/skrystosik)\
**Post date:** [December 12, 2019, 9:54am UTC](https://community.dynatrace.com/t/help-regex-user-actions/22704/4 "2019-12-12T09:54:14Z")

</div>

Just make it like that:

 ![22885-1576144422545.png](https://global.discourse-cdn.com/dynatrace/original/2X/3/344c7a2159750053ea5cdd45a71e18cb7d1544cd.png)

Then you will have replaced last part of URL with /, than this whole string replace with / and you will have what you need.

---

<div class="post-metadata">

**Author:** ![service\_apms](https://avatars.discourse-cdn.com/v4/letter/s/c4cdca/32.png) [@service\_apms](https://community.dynatrace.com/u/service_apms)\
**Post date:** [December 12, 2019, 10:41am UTC](https://community.dynatrace.com/t/help-regex-user-actions/22704/5 "2019-12-12T10:41:59Z")

</div>

Thank you sebastian i have a small additional question.  
sometimes there is an action name before that like :

Loading of page Example1/Example2/XXXX and the result is Example1/Example2/

So what come after Example2 is deleted but the “Loading of page” is also deleted"  
Is this normal ?

---

<div class="post-metadata">

**Author:** ![service\_apms](https://avatars.discourse-cdn.com/v4/letter/s/c4cdca/32.png) [@service\_apms](https://community.dynatrace.com/u/service_apms)\
**Post date:** [December 12, 2019, 10:42am UTC](https://community.dynatrace.com/t/help-regex-user-actions/22704/6 "2019-12-12T10:42:12Z")

</div>

Thank you sebastian i have a small additional question.  
sometimes there is an action name before that like :

Loading of page Example1/Example2/XXXX and the result is Example1/Example2/

So what come after Example2 is deleted but the “Loading of page” is also deleted"  
Is this normal ?

---

<div class="post-metadata">

**Author:** ![skrystosik](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/skrystosik/32/21133_2.png) [@skrystosik](https://community.dynatrace.com/u/skrystosik)\
**Post date:** [December 12, 2019, 12:10pm UTC](https://community.dynatrace.com/t/help-regex-user-actions/22704/7 "2019-12-12T12:10:56Z")

</div>

Yes, it’s normal. When you will use your placeholder in user aciton name just past it like this for load actions:

Loading of page {placeholder\_name}

---

<div class="post-metadata">

**Author:** ![service\_apms](https://avatars.discourse-cdn.com/v4/letter/s/c4cdca/32.png) [@service\_apms](https://community.dynatrace.com/u/service_apms)\
**Post date:** [December 12, 2019, 1:37pm UTC](https://community.dynatrace.com/t/help-regex-user-actions/22704/8 "2019-12-12T13:37:58Z")

</div>

Thanks a lot Sebastian

---

<div class="post-metadata">

**Author:** ![skanchalwar2](https://avatars.discourse-cdn.com/v4/letter/s/9e8a1a/32.png) [@skanchalwar2](https://community.dynatrace.com/u/skanchalwar2)\
**Post date:** [July 3, 2020, 2:43pm UTC](https://community.dynatrace.com/t/help-regex-user-actions/22704/9 "2020-07-03T14:43:56Z")

</div>

Wow! Now we got those trailing numbers removed, can we mark it as Key user action in one go? Instead of marking all of them individually?
