- Mark as New
- Subscribe to RSS Feed
- Permalink
‎27 Jun 2018 08:41 PM
Hi guys,
What should be the right regex in order to extract the second part of the URI?
In the followed example we would like to get vh3
Solved! Go to Solution.
- Labels:
-
request attributes
- Mark as New
- Subscribe to RSS Feed
- Permalink
‎27 Jun 2018 09:18 PM
media\/([^\/?]*+) might work if you're only interested in that specific pattern. I was trying to test it but it seems to keep crashing my page.
For reference here's a good doc on regex in Dynatrace: https://www.dynatrace.com/support/help/organize-monitored-entities/reference/how-do-i-use-regular-expressions-in-dynatrace/
James
- Mark as New
- Subscribe to RSS Feed
- Permalink
‎28 Jun 2018 03:14 AM
Hi James,
Thanks for your answer
I read this page and tried few times different ways with no luck....
Your regex seem to invalid
- Mark as New
- Subscribe to RSS Feed
- Permalink
‎28 Jun 2018 06:18 AM
post processing options allow for splitting the values, which will create an array of the different parts (assuming the delimiter is /). The question is how do I retrieve only the second element of that array
- Mark as New
- Subscribe to RSS Feed
- Permalink
‎28 Jun 2018 01:04 PM
the split actually puts multiple values on the request, so that is not what you want here.
instead of that remove the split ad do a regex that will go for the second part. this regex should do the trick, it jumps over part one and takes part two.
/[^/]++/([^/]++)
- Mark as New
- Subscribe to RSS Feed
- Permalink
‎28 Jun 2018 02:47 PM
Thanks Michael
This one is look working
