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!

Index This | Forward, I’m heavy; backward, I’m not. What am I?

April 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

A Guide To Cloud Migration Success

As enterprises’ rapid expansion to the cloud continues, IT leaders are continuously looking for ways to focus ...

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