Splunk Search

How to write rex to remove?

joe06031990
Communicator

Hi,

I have the bellow event:

 

{"log":"2023-02-16t14:14:25.827471424z stderr F I0216 14:14:25.827359               1 connection.go:153]

connecting to UNIX:///csi/csi.sock"

I need to remove 2023-02-16t14:14:25.827471424z stderr F I0216 14:14:25.827359 and have tried rex but unable to do so, just wondered if someone could help me?

 

Thanks,

Joe

Labels (2)
Tags (1)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust
| replace "2023-02-16t14:14:25.827471424z stderr F I0216 14:14:25.827359" WITH "" IN _raw

View solution in original post

ITWhisperer
SplunkTrust
SplunkTrust

rex works with pattern matching - is it just this exact string you want to remove or are there similar strings? If so, what pattern do the strings follow? This is key to determining what regular expression to use.

richgalloway
SplunkTrust
SplunkTrust

By "remove" do you mean you want to get rid of that text or extract it into fields?

What regular expressions (rex commands) have you tried so far?

---
If this reply helps you, Karma would be appreciated.
0 Karma

joe06031990
Communicator

Yeah I want to completely remove 2023-02-16t14:14:25.827471424z stderr F I0216 14:14:25.827359.

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
| replace "2023-02-16t14:14:25.827471424z stderr F I0216 14:14:25.827359" WITH "" IN _raw
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...