<?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: Multiple-lines fields extraction from an already extracted field in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Multiple-lines-fields-extraction-from-an-already-extracted-field/m-p/43172#M10154</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;sounds for me similar to my problem to parse the email of my dsl-router with embedded logline entries.&lt;BR /&gt;
I stored the entries (unique pattern "timestamp followed from 4 spaces") as a multivalue field with a transformation and then splitted it in timestamp-logmessage pairs with&lt;/P&gt;

&lt;P&gt;index=mail | mvexpand logevents | table logevents | rex field=logevents "..." | ...&lt;/P&gt;

&lt;P&gt;in your case i would try to split the field MessageBody at the end of line characters into a mv-field with makemv&lt;/P&gt;

&lt;P&gt;after that "mvexpand MessageBody" maybe with a trailing " | table MessageBody "&lt;/P&gt;

&lt;P&gt;and then parse every line (now a single event) with a regex like&lt;/P&gt;

&lt;P&gt;rex field=MessageBody "(?&lt;FIRST&gt;[^-]+)-(?&lt;SECOND&gt;[^-]+)-(?&lt;THIRD&gt;[^-]+)-"&lt;/THIRD&gt;&lt;/SECOND&gt;&lt;/FIRST&gt;&lt;/P&gt;

&lt;P&gt;maybe that helps you to find your solution?&lt;/P&gt;</description>
    <pubDate>Thu, 22 Aug 2013 11:55:02 GMT</pubDate>
    <dc:creator>nekb1958</dc:creator>
    <dc:date>2013-08-22T11:55:02Z</dc:date>
    <item>
      <title>Multiple-lines fields extraction from an already extracted field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Multiple-lines-fields-extraction-from-an-already-extracted-field/m-p/43171#M10153</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I have a text extracted in a field called MessageBody , the text contains multilines not a single lines and fields are separated by dash "-" &lt;BR /&gt;
The text format is the following:&lt;BR /&gt;
Field1 - Field2 - Needed Field3 - &lt;BR /&gt;
Field4 - Field5&lt;BR /&gt;
Another Field1 - Another Field2 - Another Needed Field3 - &lt;BR /&gt;
Another Field4 - Another Field5&lt;/P&gt;

&lt;P&gt;I need a regular expression to extract Fields number 3, How can i do that?&lt;/P&gt;</description>
      <pubDate>Thu, 22 Aug 2013 10:44:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Multiple-lines-fields-extraction-from-an-already-extracted-field/m-p/43171#M10153</guid>
      <dc:creator>royimad</dc:creator>
      <dc:date>2013-08-22T10:44:29Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple-lines fields extraction from an already extracted field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Multiple-lines-fields-extraction-from-an-already-extracted-field/m-p/43172#M10154</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;sounds for me similar to my problem to parse the email of my dsl-router with embedded logline entries.&lt;BR /&gt;
I stored the entries (unique pattern "timestamp followed from 4 spaces") as a multivalue field with a transformation and then splitted it in timestamp-logmessage pairs with&lt;/P&gt;

&lt;P&gt;index=mail | mvexpand logevents | table logevents | rex field=logevents "..." | ...&lt;/P&gt;

&lt;P&gt;in your case i would try to split the field MessageBody at the end of line characters into a mv-field with makemv&lt;/P&gt;

&lt;P&gt;after that "mvexpand MessageBody" maybe with a trailing " | table MessageBody "&lt;/P&gt;

&lt;P&gt;and then parse every line (now a single event) with a regex like&lt;/P&gt;

&lt;P&gt;rex field=MessageBody "(?&lt;FIRST&gt;[^-]+)-(?&lt;SECOND&gt;[^-]+)-(?&lt;THIRD&gt;[^-]+)-"&lt;/THIRD&gt;&lt;/SECOND&gt;&lt;/FIRST&gt;&lt;/P&gt;

&lt;P&gt;maybe that helps you to find your solution?&lt;/P&gt;</description>
      <pubDate>Thu, 22 Aug 2013 11:55:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Multiple-lines-fields-extraction-from-an-already-extracted-field/m-p/43172#M10154</guid>
      <dc:creator>nekb1958</dc:creator>
      <dc:date>2013-08-22T11:55:02Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple-lines fields extraction from an already extracted field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Multiple-lines-fields-extraction-from-an-already-extracted-field/m-p/43173#M10155</link>
      <description>&lt;P&gt;The following should work as an extract in props.conf; non-space followed by space, dash, space - two times, then grab all non-space as field3&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;EXTRACT-blah = (?m)^(\S+\s\-\s){2}(?&amp;lt;field3&amp;gt;\S+)&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Aug 2013 12:15:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Multiple-lines-fields-extraction-from-an-already-extracted-field/m-p/43173#M10155</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2013-08-22T12:15:37Z</dc:date>
    </item>
  </channel>
</rss>

