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!

Splunk + ThousandEyes: Correlate frontend, app, and network data to troubleshoot ...

 Are you tired of troubleshooting delays caused by siloed frontend, application, and network data? We've got a ...

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI!Discover how Splunk’s agentic AI ...

🔐 Trust at Every Hop: How mTLS in Splunk Enterprise 10.0 Makes Security Simpler

From Idea to Implementation: Why Splunk Built mTLS into Splunk Enterprise 10.0  mTLS wasn’t just a checkbox ...