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!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...