Splunk Search

Removing all numbers from _raw message

cpeteman
Contributor

I want regex to remove all numbers from _raw message. Right now I have the search

* |rex mode=sed "s/ \d{1,}//g" |table _raw

i.e.

Aug 14 20:34:01 hype56 kernel: ib0: join failed for ff12:401b:ffff:0000:0000:0000:ffff:ffff, status -22

becomes

Aug:34:01 hype56 kernel: ib0: join failed for ff12:401b:ffff:0000:0000:0000:ffff:ffff, status -

but I want it to be

Aug:: hype kernel: ib: join failed for ff:b:ffff::::ffff:ffff, status -
Tags (2)
0 Karma
1 Solution

cpeteman
Contributor

Well looks like the right answer was already sitting in front of me

  * |rex mode=sed "s/\d{1,}//g" |table _raw

Darn white space 😉

Note: One could also replace \d{1,} with \d+

View solution in original post

0 Karma

cpeteman
Contributor

Well looks like the right answer was already sitting in front of me

  * |rex mode=sed "s/\d{1,}//g" |table _raw

Darn white space 😉

Note: One could also replace \d{1,} with \d+

0 Karma
Get Updates on the Splunk Community!

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...