Splunk Search

Help fixing string with newline that is not searchable

sjova
Engager

Hi,

if my string is "asdf .\r\n asdf" and I filter on that (Add to search) I get "No results found".

Any idea how to fix this?

Thanks,
Gunnar

0 Karma
1 Solution

manjunathmeti
SplunkTrust
SplunkTrust

Try this:

index=INDEXNAME FIELDNAME="asdf*asdf"

View solution in original post

sjova
Engager

Thanks, I just replaced \r\n with \n and then it worked fine 🙂

0 Karma

manjunathmeti
SplunkTrust
SplunkTrust

Try this:

index=INDEXNAME FIELDNAME="asdf*asdf"

sjova
Engager

It is not possible to add it more globally to it affects all my queries(that have line breaks in them)?

0 Karma

manjunathmeti
SplunkTrust
SplunkTrust

It's problem with \r. Use * in place of \r. All other characters will match.

index=INDEXNAME FIELDNAME="asdf *\n asdf"
0 Karma

sjova
Engager

asdf is just an example. That string is really a stacktrace from a program. Any idea how I can do this in a general way (so that my queries work)?

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