Knowledge Management

How to use regex to get only the data cd?

shreyasamin64
Explorer

Regex to get only the data cd

ab.aaaa.asd.cd

Labels (1)
0 Karma

venky1544
Builder

HI @shreyasamin64 

you can try the below regex

| makeresults |eval new = "ab.aaaa.asd.cd" |rex field=new "(?<final>[\w+.].$)"|table _time,new ,final

 

venky1544_0-1650985397500.png

 

if it helps karma points are appreciated/please accept the solution if it worked 

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
| rex "(\w+\.){3}(?<cd>\w+)"
0 Karma
Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...