<?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: Extracting individual lines from a single field in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Extracting-individual-lines-from-a-single-field/m-p/75242#M181322</link>
    <description>&lt;P&gt;Hi, I used some stacktrace to make this work. The first rex is just to &lt;EM&gt;create&lt;/EM&gt; the multiline field, so you can skip that. The second rex pulls it apart into a multivalued field.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;...| rex "(?m)\s+(?&amp;lt;stacktrace&amp;gt;(\s*at\s+.*\))+)" 
| rex field=stacktrace max_match=10 "(?&amp;lt;lines&amp;gt;.*)\n"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Hope this helps,&lt;/P&gt;

&lt;P&gt;Kristian&lt;/P&gt;</description>
    <pubDate>Tue, 25 Jun 2013 20:38:36 GMT</pubDate>
    <dc:creator>kristian_kolb</dc:creator>
    <dc:date>2013-06-25T20:38:36Z</dc:date>
    <item>
      <title>Extracting individual lines from a single field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extracting-individual-lines-from-a-single-field/m-p/75241#M181321</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I am working with Nessus data and I am trying to pull a software list from the results.  Nessus exports this data in a single field:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;The following software are installed on the remote host :
Cisco WebEx Meetings
OpenSSL-0.9.7c Binaries (GnuWin32)  [version 0.9.7c]
Python 2.5 elementtree-1.2.6-20050316
Python 2.5 pycrypto-2.0.1
Python 2.5 pywin32-211
McAfee VirusScan Enterprise  [version 8.7.0]  [installed on 2010/09/08]
Microsoft Visual C++ 2008 Redistributable - x86 9.0.30729.4148  [version 9.0.30729.4148] [installed on 2010/09/14]
Microsoft SQL Server 2008 Management Objects  [version 10.1.2531.0]  [installed on 2012/10/18]
ActiveWatchIse  [version 1.0.0]  [installed on 2010/09/14]
AWMonitorSvcSetup  [version 1.0.0]  [installed on 2010/09/14]
Python 2.5.2  [version 2.5.2150]  [installed on 2010/09/14]
Microsoft Visual C++ 2005 Redistributable  [version 8.0.61001]  [installed on 2012/12/16]
Microsoft Visual C++ 2008 Redistributable - x86 9.0.30729.6161  [version 9.0.30729.6161]  [installed on 2012/12/16]
Xiotech ISE Manager   [version 3.1.5.4]  [installed on 2012/10/18]
McAfee Agent  [version 4.5.0.1270]  [installed on 2011/05/02]
SQL Server System CLR Types  [version 10.1.2531.0]  [installed on 2012/10/18]
VMware Tools  [version 8.3.18.20074]  [installed on 2013/02/24]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I need to "table" each of the above lines with a matching Host/Software pair.  I cannot figure out how to parse this field correctly.  &lt;/P&gt;

&lt;P&gt;I have tried:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;rex field=Plugin_Output "(?&amp;lt; software&amp;gt;.*\n)"  (extra space only for display)
makemv delim="\n", Plugin_Output
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Any assistance with this one?&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jun 2013 19:20:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extracting-individual-lines-from-a-single-field/m-p/75241#M181321</guid>
      <dc:creator>erstexas</dc:creator>
      <dc:date>2013-06-25T19:20:55Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting individual lines from a single field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extracting-individual-lines-from-a-single-field/m-p/75242#M181322</link>
      <description>&lt;P&gt;Hi, I used some stacktrace to make this work. The first rex is just to &lt;EM&gt;create&lt;/EM&gt; the multiline field, so you can skip that. The second rex pulls it apart into a multivalued field.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;...| rex "(?m)\s+(?&amp;lt;stacktrace&amp;gt;(\s*at\s+.*\))+)" 
| rex field=stacktrace max_match=10 "(?&amp;lt;lines&amp;gt;.*)\n"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Hope this helps,&lt;/P&gt;

&lt;P&gt;Kristian&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jun 2013 20:38:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extracting-individual-lines-from-a-single-field/m-p/75242#M181322</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2013-06-25T20:38:36Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting individual lines from a single field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extracting-individual-lines-from-a-single-field/m-p/75243#M181323</link>
      <description>&lt;P&gt;Some ideas. Replace [ with | and ] with blank space using the rex command. Then create a multi-value field delimiting on the |.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jun 2013 02:48:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extracting-individual-lines-from-a-single-field/m-p/75243#M181323</guid>
      <dc:creator>adrianathome</dc:creator>
      <dc:date>2013-06-27T02:48:35Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting individual lines from a single field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extracting-individual-lines-from-a-single-field/m-p/75244#M181324</link>
      <description>&lt;P&gt;This pointed me in the right direction and I think I got it figured out now.  Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jun 2013 14:19:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extracting-individual-lines-from-a-single-field/m-p/75244#M181324</guid>
      <dc:creator>erstexas</dc:creator>
      <dc:date>2013-06-27T14:19:52Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting individual lines from a single field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extracting-individual-lines-from-a-single-field/m-p/75245#M181325</link>
      <description>&lt;P&gt;This looked promising but it was not working for me.  "lines" (in your example) would not populate. &lt;/P&gt;

&lt;P&gt;I did figure it out though this morning and will post my solution.  Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jun 2013 14:21:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extracting-individual-lines-from-a-single-field/m-p/75245#M181325</guid>
      <dc:creator>erstexas</dc:creator>
      <dc:date>2013-06-27T14:21:23Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting individual lines from a single field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extracting-individual-lines-from-a-single-field/m-p/75246#M181326</link>
      <description>&lt;P&gt;I got this working with the following query:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | rex field=Plugin_Output mode=sed "s/\n/|/g" | makemv delim="|" Plugin_Output | mvexpand Plugin_Output | table Host, Plugin_Output
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Looking back now, I could have been probably got it working just with the newline once I got the chain of commands correct, but the above works and I can fine-tune it from here.   &lt;/P&gt;</description>
      <pubDate>Thu, 27 Jun 2013 14:35:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extracting-individual-lines-from-a-single-field/m-p/75246#M181326</guid>
      <dc:creator>erstexas</dc:creator>
      <dc:date>2013-06-27T14:35:41Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting individual lines from a single field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extracting-individual-lines-from-a-single-field/m-p/75247#M181327</link>
      <description>&lt;P&gt;Solution below.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jun 2013 14:38:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extracting-individual-lines-from-a-single-field/m-p/75247#M181327</guid>
      <dc:creator>erstexas</dc:creator>
      <dc:date>2013-06-27T14:38:17Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting individual lines from a single field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extracting-individual-lines-from-a-single-field/m-p/75248#M181328</link>
      <description>&lt;P&gt;hello, can you please explain me what (?m) is. thanks in advance&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jul 2013 09:43:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extracting-individual-lines-from-a-single-field/m-p/75248#M181328</guid>
      <dc:creator>eashwar</dc:creator>
      <dc:date>2013-07-05T09:43:59Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting individual lines from a single field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extracting-individual-lines-from-a-single-field/m-p/75249#M181329</link>
      <description>&lt;P&gt;multi-line&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jul 2013 14:18:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extracting-individual-lines-from-a-single-field/m-p/75249#M181329</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2013-07-11T14:18:38Z</dc:date>
    </item>
  </channel>
</rss>

