<?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 Re: How to organize values in Statistics search? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-organize-values-in-Statistics-search/m-p/370599#M109074</link>
    <description>&lt;P&gt;First, verify whether there is an unprintable character between "Question? No" and "If yes, Question?".  If so, we will need to key on that to split the data.&lt;/P&gt;

&lt;P&gt;If not, then the next question is, are the question stems always exactly the same wording, or a small set of alternatives?  In that case, we can use a rex to extract them to individual fields using a regex such as one of the following....&lt;/P&gt;

&lt;P&gt;...if you want the questions and answers each separate...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex field=myfield "(?&amp;lt;Q1&amp;gt;Question\?)\s*(?&amp;lt;A1&amp;gt;.*?)(?&amp;lt;Q2&amp;gt;If yes, Question\?)\s*(?&amp;lt;A2&amp;gt;.*?)(?&amp;lt;Q3&amp;gt;Does this even do something\?)\s*(?&amp;lt;A3&amp;gt;.*?)(?&amp;lt;Q4&amp;gt;Is the event a false positive\?)\s*(?&amp;lt;A4&amp;gt;.*?)(?&amp;lt;Q5&amp;gt;Ticket number:)\s*(?&amp;lt;A5&amp;gt;.*?)(?&amp;lt;Q6&amp;gt;Source Unique Identifier \(UI\):)\s*(?&amp;lt;A6&amp;gt;.*?)(?&amp;lt;Q7&amp;gt;Alert trigger time:)\s*(?&amp;lt;A7&amp;gt;.*?)(?&amp;lt;Q8&amp;gt;Event start time:)\s*(?&amp;lt;A8&amp;gt;.*)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;...if you want each question and answer as a unit ...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex field=myfield "(?&amp;lt;Q1&amp;gt;Question\?\s*.*?)(?&amp;lt;Q2&amp;gt;If yes, Question\?\s*.*?)(?&amp;lt;Q3&amp;gt;Does this even do something\?\s*.*?)(?&amp;lt;Q4&amp;gt;Is the event a false positive\?\s*.*?)(?&amp;lt;Q5&amp;gt;Ticket number:\s*.*?)(?&amp;lt;Q6&amp;gt;Source Unique Identifier \(UI\):\s*.*?)(?&amp;lt;Q7&amp;gt;Alert trigger time:\s*.*?)(?&amp;lt;Q8&amp;gt;Event start time:\s*.*)"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 09 May 2017 21:05:49 GMT</pubDate>
    <dc:creator>DalJeanis</dc:creator>
    <dc:date>2017-05-09T21:05:49Z</dc:date>
    <item>
      <title>How to organize values in Statistics search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-organize-values-in-Statistics-search/m-p/370598#M109073</link>
      <description>&lt;P&gt;Hi, I have a blob of text in both the title and description file, I've tried looking for how to seperate them when I am seraching but I have not found anything. It looks like &lt;/P&gt;

&lt;P&gt;Question? NoIf yes, Question? N/ADoes this even do something? N/AIs the event a false positive? YesTicket number: N/ASource Unique Identifier (UI):     Alert trigger time: Date/time UTCEvent start time: Date/time &lt;/P&gt;

&lt;P&gt;etc&lt;/P&gt;

&lt;P&gt;I would like it to look like this&lt;BR /&gt;
Question? No&lt;BR /&gt;
If yes, Question? N/A&lt;BR /&gt;
Does this even do something? N/A&lt;BR /&gt;
Is the event a false positive? Yes&lt;BR /&gt;
Ticket number: N/A&lt;BR /&gt;
Source Unique Identifier (UI):&lt;BR /&gt;&lt;BR /&gt;
Alert trigger time: Date/time UTC&lt;BR /&gt;
Event start time: Date/time &lt;/P&gt;

&lt;P&gt;The search I'm using is this &lt;/P&gt;

&lt;P&gt;| inputlookup append=t investigative_canvas_entries_lookup &lt;BR /&gt;
| table _time creator owner title description canvas_id&lt;BR /&gt;
| sort -_time &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 14:00:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-organize-values-in-Statistics-search/m-p/370598#M109073</guid>
      <dc:creator>ecm9210</dc:creator>
      <dc:date>2020-09-29T14:00:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to organize values in Statistics search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-organize-values-in-Statistics-search/m-p/370599#M109074</link>
      <description>&lt;P&gt;First, verify whether there is an unprintable character between "Question? No" and "If yes, Question?".  If so, we will need to key on that to split the data.&lt;/P&gt;

&lt;P&gt;If not, then the next question is, are the question stems always exactly the same wording, or a small set of alternatives?  In that case, we can use a rex to extract them to individual fields using a regex such as one of the following....&lt;/P&gt;

&lt;P&gt;...if you want the questions and answers each separate...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex field=myfield "(?&amp;lt;Q1&amp;gt;Question\?)\s*(?&amp;lt;A1&amp;gt;.*?)(?&amp;lt;Q2&amp;gt;If yes, Question\?)\s*(?&amp;lt;A2&amp;gt;.*?)(?&amp;lt;Q3&amp;gt;Does this even do something\?)\s*(?&amp;lt;A3&amp;gt;.*?)(?&amp;lt;Q4&amp;gt;Is the event a false positive\?)\s*(?&amp;lt;A4&amp;gt;.*?)(?&amp;lt;Q5&amp;gt;Ticket number:)\s*(?&amp;lt;A5&amp;gt;.*?)(?&amp;lt;Q6&amp;gt;Source Unique Identifier \(UI\):)\s*(?&amp;lt;A6&amp;gt;.*?)(?&amp;lt;Q7&amp;gt;Alert trigger time:)\s*(?&amp;lt;A7&amp;gt;.*?)(?&amp;lt;Q8&amp;gt;Event start time:)\s*(?&amp;lt;A8&amp;gt;.*)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;...if you want each question and answer as a unit ...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex field=myfield "(?&amp;lt;Q1&amp;gt;Question\?\s*.*?)(?&amp;lt;Q2&amp;gt;If yes, Question\?\s*.*?)(?&amp;lt;Q3&amp;gt;Does this even do something\?\s*.*?)(?&amp;lt;Q4&amp;gt;Is the event a false positive\?\s*.*?)(?&amp;lt;Q5&amp;gt;Ticket number:\s*.*?)(?&amp;lt;Q6&amp;gt;Source Unique Identifier \(UI\):\s*.*?)(?&amp;lt;Q7&amp;gt;Alert trigger time:\s*.*?)(?&amp;lt;Q8&amp;gt;Event start time:\s*.*)"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 09 May 2017 21:05:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-organize-values-in-Statistics-search/m-p/370599#M109074</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-05-09T21:05:49Z</dc:date>
    </item>
  </channel>
</rss>

