Splunk Search

how to trim the values

john
Communicator

id=[ci.fif.3000-67777]
id=[fg.hki.4000-88888]

this the content of file i am working with from this i want only the values(3000 and 4000)please help.....

Tags (1)
0 Karma

Ayn
Legend

Extract the values as fields in Splunk. Quickest way is to use rex:

... | rex "\.(?<myvalue>\d+)-\d+\]"

This command creates a field myfield from your data when you include the command in your search.

0 Karma

john
Communicator

i got right value

0 Karma

john
Communicator

Thanks Ayn...

0 Karma
Get Updates on the Splunk Community!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

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