Splunk Search

how to display "Blank Character" in multivalue field

gfs2277
New Member

hello everyone,

i have a question about "Blank Character" display in multivalue field
i use a "rex" to extract many fields ,

| rex "\n(?P[1-9\s])\s*(?P[12])\s*(?P\S*)\s" max_match=0

in field1 , it could be 1-9 OR \s (blank)
when i table this field , the \s disappeared
for some reason , i want to reserve the "blank"
Does anyone have any suggestions ?
thanky you very much

0 Karma

jrodman
Splunk Employee
Splunk Employee

This regex is pretty confusing to me. You have ?P but no name for the capturing group. Is there a purpose for the presence of the ?P at the start of each group? Perhaps our unhelpful markdown interpreter ate the <fieldname> component.

In any event, there are several scenarios in which the visual display of an empty-space value of a field will not be satisfying. Are you sure the field is not present? Try putting a character on the end of each value to test, such as with |eval myfield=myfield . "x"

0 Karma
Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...