Splunk Search

how can i do to extract with REX

guillecasco
Path Finder

URR: /UMY/t5/update/?body-hash=6764545kk345565e1e9c946034gg&environment=350789e8-j235-4f5c-95f2-lmnu9458b

how can i use rex to extract those numbers and leters that is next to enviroment= . There are many logs with those lines . That number represent a unice id for some device that hits some backend. I then need to do a table with every single device extracted in the last 15 days for example

thanks!

Tags (2)
0 Karma

Richfez
SplunkTrust
SplunkTrust

If it is always the last thing on the line,

rex "environment=(?<MyFieldName>\S+)$"

If it is not, drop the last dollar sign off and it'll ONLY grab up to the next space.

Get Updates on the Splunk Community!

October Community Champions: A Shoutout to Our Contributors!

As October comes to a close, we want to take a moment to celebrate the people who make the Splunk Community ...

Community Content Calendar, November Edition

Welcome to the November edition of our Community Spotlight! Each month, we dive into the Splunk Community to ...

Stay Connected: Your Guide to November Tech Talks, Office Hours, and Webinars!

What are Community Office Hours? Community Office Hours is an interactive 60-minute Zoom series where ...