Splunk Search

Can you help me with my regex extraction of a field?

alex_kh
Explorer

Hello Friends,

I have the following issue

I have two types of logs: A & B

A & B are from the same Index, have the same source type and same source (wish of the Client)

BUT they differ in two aspects:
1) the one contains the value "aaa" and the another "bbb"
2) log A has the structure FIELDNAME=VALUE
log B has the structure FIELDNAME = VALUE\

since they belong to the same sourcetype i have no idea how to delete this \ after the value

Please help

0 Karma

renjith_nair
SplunkTrust
SplunkTrust

@alex_kh,

Try

your search |rex mode=sed field=FIELDNAME "s/\\\$//"
Happy Splunking!
0 Karma

renjith_nair
SplunkTrust
SplunkTrust

@alex_kh, Does it work for you?

Happy Splunking!
0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

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

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

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