Splunk Search

Remove colons from a number

dsmeerkat
Explorer

I'm looking to get rid of the numbers and colon before the larger one in the middle, and after

I have

1:31705:1
1:19439:8
1:19438:13

What I would like is

31705
19439
19438

Tags (1)
0 Karma
1 Solution

xpac
SplunkTrust
SplunkTrust

Try this:

| rex field=yourfield "^[^:]+:(?<yourfield>[^:]+):"

Hope that helps - if it does I'd be happy if you would upvote/accept this answer, so others could profit from it. 🙂

View solution in original post

xpac
SplunkTrust
SplunkTrust

Try this:

| rex field=yourfield "^[^:]+:(?<yourfield>[^:]+):"

Hope that helps - if it does I'd be happy if you would upvote/accept this answer, so others could profit from it. 🙂

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