Splunk Search

field value is a whitespace

wtaylor149
Explorer

I have a field that sometimes has only what appears to be a whatspace.  How would I replace the existing whitespace with a value of "none"?

Labels (1)
0 Karma

thambisetty
SplunkTrust
SplunkTrust

| rex field=yourfield “/s/^\s$/yourvaluetoreplace/g”

 

Note: dont copy paste. The above solution works only if there is whitespace

————————————
If this helps, give a like below.
0 Karma

wtaylor149
Explorer

Thanks for the quick response but that did not work, even after I fixed the sed structure.

0 Karma
Get Updates on the Splunk Community!

Splunk Mobile: Your Brand-New Home Screen

Meet Your New Mobile Hub  Hello Splunk Community!  Staying connected to your data—no matter where you are—is ...

Introducing Value Insights (Beta): Understand the Business Impact your organization ...

Real progress on your strategic priorities starts with knowing the business outcomes your teams are delivering ...

Enterprise Security (ES) Essentials 8.3 is Now GA — Smarter Detections, Faster ...

As of today, Enterprise Security (ES) Essentials 8.3 is now generally available, helping SOC teams simplify ...