<?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: What would be the strategy to extract relevant data from field with unnecessary data? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/What-would-be-the-strategy-to-extract-relevant-data-from-field/m-p/344590#M170164</link>
    <description>&lt;P&gt;Try like this (line 3 would keep the description value before the ##Survey##)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=foo
| fields description
| eval description=mvindex(split(description,"##Survey##"),0)
| makemv delim=" " description
| mvexpand description
| eval LowerCase=lower(description)
| eval length=len(LowerCase) |search length &amp;gt; 2
|top limit=20 LowerCase
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 20 Apr 2018 16:22:36 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2018-04-20T16:22:36Z</dc:date>
    <item>
      <title>What would be the strategy to extract relevant data from field with unnecessary data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-would-be-the-strategy-to-extract-relevant-data-from-field/m-p/344589#M170163</link>
      <description>&lt;P&gt;Description field parsing data from has some unnecessary survey data that I would like to ignore and NOT count. That data is denoted by ##Survey##. All data after this denotation can be ignored but I have not been able to determine a good way to do this. Can this be done without regex?&lt;/P&gt;

&lt;P&gt;Example of the what the user input field looks like (since its text input the length and words change):&lt;/P&gt;

&lt;P&gt;description="My outlook wont opena as a i keep getting an error message. ##Survey## Which of the following best describes your needs?: My Outlook is slow or not launching - Please clarify your issue further::  Outlook is slow or unable to launch &lt;/P&gt;

&lt;P&gt;OR &lt;/P&gt;

&lt;P&gt;description="I tried to login via * a few days ago and I kept getting the message that my password and/or token information was incorrect. I reset my token PIN and it still wouldn't work (PIN first, token key second). Does this happen often? I need to login this weekend and would like to have the issue resolved as soon as possible. Thank you! ##Survey## Please choose the option which best describes your problem.: ASSISTANCE WITH * TOKEN - Do you need assistance with your * token?: yes - Which best describes your request?: Other &lt;/P&gt;

&lt;P&gt;My search counts words in the description field to see what issues may be trending. However, the words in the survey are skewing my data. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=foo
    | fields description
    | makemv delim=" " description
    | mvexpand description
    | eval LowerCase=lower(description)
    | eval length=len(LowerCase) |search length &amp;gt; 2
    |top limit=20 LowerCase
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 20 Apr 2018 15:47:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-would-be-the-strategy-to-extract-relevant-data-from-field/m-p/344589#M170163</guid>
      <dc:creator>nqjpm</dc:creator>
      <dc:date>2018-04-20T15:47:44Z</dc:date>
    </item>
    <item>
      <title>Re: What would be the strategy to extract relevant data from field with unnecessary data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-would-be-the-strategy-to-extract-relevant-data-from-field/m-p/344590#M170164</link>
      <description>&lt;P&gt;Try like this (line 3 would keep the description value before the ##Survey##)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=foo
| fields description
| eval description=mvindex(split(description,"##Survey##"),0)
| makemv delim=" " description
| mvexpand description
| eval LowerCase=lower(description)
| eval length=len(LowerCase) |search length &amp;gt; 2
|top limit=20 LowerCase
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 20 Apr 2018 16:22:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-would-be-the-strategy-to-extract-relevant-data-from-field/m-p/344590#M170164</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2018-04-20T16:22:36Z</dc:date>
    </item>
    <item>
      <title>Re: What would be the strategy to extract relevant data from field with unnecessary data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-would-be-the-strategy-to-extract-relevant-data-from-field/m-p/344591#M170165</link>
      <description>&lt;P&gt;This will remove "##Survey##" and everything following it from the field &lt;CODE&gt;description&lt;/CODE&gt;:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|rex mode=sed field=description "s/##Survey##.*//"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So I'd arrange your search commands like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=foo
| fields description
| rex mode=sed field=description "s/##Survey##.*//"
| makemv delim=" " description
| mvexpand description
| eval LowerCase=lower(description)
| eval length=len(LowerCase) 
| search length &amp;gt; 2
| top limit=20 LowerCase
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 20 Apr 2018 16:25:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-would-be-the-strategy-to-extract-relevant-data-from-field/m-p/344591#M170165</guid>
      <dc:creator>elliotproebstel</dc:creator>
      <dc:date>2018-04-20T16:25:19Z</dc:date>
    </item>
    <item>
      <title>Re: What would be the strategy to extract relevant data from field with unnecessary data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-would-be-the-strategy-to-extract-relevant-data-from-field/m-p/344592#M170166</link>
      <description>&lt;P&gt;That works great! Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 20 Apr 2018 17:15:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-would-be-the-strategy-to-extract-relevant-data-from-field/m-p/344592#M170166</guid>
      <dc:creator>nqjpm</dc:creator>
      <dc:date>2018-04-20T17:15:50Z</dc:date>
    </item>
    <item>
      <title>Re: What would be the strategy to extract relevant data from field with unnecessary data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-would-be-the-strategy-to-extract-relevant-data-from-field/m-p/344593#M170167</link>
      <description>&lt;P&gt;This also works. Two great working answers in less than an hour. I love this community!&lt;/P&gt;</description>
      <pubDate>Fri, 20 Apr 2018 17:16:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-would-be-the-strategy-to-extract-relevant-data-from-field/m-p/344593#M170167</guid>
      <dc:creator>nqjpm</dc:creator>
      <dc:date>2018-04-20T17:16:39Z</dc:date>
    </item>
  </channel>
</rss>

