<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Display table with field values having spaces in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Display-table-with-field-values-having-spaces/m-p/472755#M45761</link>
    <description>&lt;P&gt;I have a field named &lt;STRONG&gt;Source&lt;/STRONG&gt; which contains spaces. &lt;BR /&gt;
&lt;EM&gt;eg&lt;/EM&gt;: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=myIndex |Source=My Source Value|ComponentValue=My Component Value
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;To make this field displayed in a table, I used the following command.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;rex "Source=(?&amp;lt;Source&amp;gt;[\S\s]*),{15}"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;For which, I get&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;-----------------------
Source
-----------------------
My
My Source Value
My
My
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If I'm doing like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;rex "Source=(?&amp;lt;Source&amp;gt;[\S\s]*)" | table Source | rename Source as source
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I get the value I require, but also the entire log as well.&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;i.e&lt;/EM&gt;:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;-----------------------
Source
-----------------------
My Source Value
index=myIndex |Source=My Source Value|ComponentValue=My Component Value

My Source Value
index=myIndex |Source=My Source Value|ComponentValue=My Component Value
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Can someone please help how to achieve this?&lt;/P&gt;</description>
    <pubDate>Thu, 31 Oct 2019 13:20:56 GMT</pubDate>
    <dc:creator>Nidd</dc:creator>
    <dc:date>2019-10-31T13:20:56Z</dc:date>
    <item>
      <title>Display table with field values having spaces</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Display-table-with-field-values-having-spaces/m-p/472755#M45761</link>
      <description>&lt;P&gt;I have a field named &lt;STRONG&gt;Source&lt;/STRONG&gt; which contains spaces. &lt;BR /&gt;
&lt;EM&gt;eg&lt;/EM&gt;: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=myIndex |Source=My Source Value|ComponentValue=My Component Value
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;To make this field displayed in a table, I used the following command.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;rex "Source=(?&amp;lt;Source&amp;gt;[\S\s]*),{15}"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;For which, I get&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;-----------------------
Source
-----------------------
My
My Source Value
My
My
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If I'm doing like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;rex "Source=(?&amp;lt;Source&amp;gt;[\S\s]*)" | table Source | rename Source as source
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I get the value I require, but also the entire log as well.&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;i.e&lt;/EM&gt;:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;-----------------------
Source
-----------------------
My Source Value
index=myIndex |Source=My Source Value|ComponentValue=My Component Value

My Source Value
index=myIndex |Source=My Source Value|ComponentValue=My Component Value
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Can someone please help how to achieve this?&lt;/P&gt;</description>
      <pubDate>Thu, 31 Oct 2019 13:20:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Display-table-with-field-values-having-spaces/m-p/472755#M45761</guid>
      <dc:creator>Nidd</dc:creator>
      <dc:date>2019-10-31T13:20:56Z</dc:date>
    </item>
    <item>
      <title>Re: Display table with field values having spaces</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Display-table-with-field-values-having-spaces/m-p/472756#M45762</link>
      <description>&lt;P&gt;@Nidd &lt;/P&gt;

&lt;P&gt;Try  &lt;CODE&gt;| rex "Source=(?&amp;lt;Source&amp;gt;[\S\s]*)\|"&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval _raw=" index=myIndex |Source=My Source Value|ComponentValue=My Component Value" 
| rex "Source=(?&amp;lt;Source&amp;gt;[\S\s]*)\|"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 31 Oct 2019 14:00:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Display-table-with-field-values-having-spaces/m-p/472756#M45762</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2019-10-31T14:00:57Z</dc:date>
    </item>
    <item>
      <title>Re: Display table with field values having spaces</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Display-table-with-field-values-having-spaces/m-p/472757#M45763</link>
      <description>&lt;P&gt;Are you trying to extract the value of Source from the following text ? "|Source=My Source Value|ComponentValue=My Component Value" If yes, use this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex field=_raw "Source=(?&amp;lt;Source&amp;gt;[^|]+)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Hope this helps.&lt;/P&gt;

&lt;P&gt;Cheers&lt;/P&gt;</description>
      <pubDate>Thu, 31 Oct 2019 14:24:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Display-table-with-field-values-having-spaces/m-p/472757#M45763</guid>
      <dc:creator>arjunpkishore5</dc:creator>
      <dc:date>2019-10-31T14:24:53Z</dc:date>
    </item>
  </channel>
</rss>

