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!

.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 ...