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!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...