<?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 rex multiple lines in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-rex-multiple-lines/m-p/395255#M169499</link>
    <description>&lt;P&gt;To get it into a table on its own it would be:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex "Dest:\s+(?&amp;lt;Data&amp;gt;.*)"
| table Data
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 10 May 2018 15:02:42 GMT</pubDate>
    <dc:creator>davey1985</dc:creator>
    <dc:date>2018-05-10T15:02:42Z</dc:date>
    <item>
      <title>How to rex multiple lines</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-rex-multiple-lines/m-p/395252#M169496</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;

&lt;P&gt;I am a newbie in Splunk and trying to do some search using the rex.&lt;/P&gt;

&lt;P&gt;The log body is like:&lt;/P&gt;

&lt;P&gt;blah blah&lt;BR /&gt;
Dest : aaa&lt;BR /&gt;
blah blah&lt;BR /&gt;
Dest: bbb&lt;BR /&gt;
blah blah&lt;BR /&gt;
Dest: ccc&lt;/P&gt;

&lt;P&gt;I searched online and used some command like ' rex field=_raw "(?s)Dest : (?.*)" ' or (?smi), but it wasn't what I wanted.&lt;/P&gt;

&lt;P&gt;I need the output to only get the table like&lt;BR /&gt;
aaa&lt;BR /&gt;
bbb&lt;BR /&gt;
ccc&lt;/P&gt;

&lt;P&gt;Is there any way to do that?&lt;/P&gt;

&lt;P&gt;Thank you very much in advance!&lt;BR /&gt;
:)&lt;/P&gt;</description>
      <pubDate>Thu, 10 May 2018 10:39:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-rex-multiple-lines/m-p/395252#M169496</guid>
      <dc:creator>garujoey</dc:creator>
      <dc:date>2018-05-10T10:39:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to rex multiple lines</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-rex-multiple-lines/m-p/395253#M169497</link>
      <description>&lt;P&gt;Like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex max_match=0 "(?ms)\s+Dest:\s+(?&amp;lt;Dest&amp;gt;\S+)"
| stats values(Dest) AS Dests
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 10 May 2018 14:19:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-rex-multiple-lines/m-p/395253#M169497</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2018-05-10T14:19:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to rex multiple lines</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-rex-multiple-lines/m-p/395254#M169498</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|  rex field=_raw "Dest\s*:\s(?P&amp;lt;myfield&amp;gt;.*)"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 10 May 2018 14:25:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-rex-multiple-lines/m-p/395254#M169498</guid>
      <dc:creator>jimodonald</dc:creator>
      <dc:date>2018-05-10T14:25:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to rex multiple lines</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-rex-multiple-lines/m-p/395255#M169499</link>
      <description>&lt;P&gt;To get it into a table on its own it would be:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex "Dest:\s+(?&amp;lt;Data&amp;gt;.*)"
| table Data
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 10 May 2018 15:02:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-rex-multiple-lines/m-p/395255#M169499</guid>
      <dc:creator>davey1985</dc:creator>
      <dc:date>2018-05-10T15:02:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to rex multiple lines</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-rex-multiple-lines/m-p/395256#M169500</link>
      <description>&lt;P&gt;+1 i misinterpretted. max_match=0 would get multiple results&lt;/P&gt;</description>
      <pubDate>Thu, 10 May 2018 15:22:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-rex-multiple-lines/m-p/395256#M169500</guid>
      <dc:creator>davey1985</dc:creator>
      <dc:date>2018-05-10T15:22:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to rex multiple lines</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-rex-multiple-lines/m-p/395257#M169501</link>
      <description>&lt;P&gt;That is the whole point, is it not?&lt;/P&gt;</description>
      <pubDate>Thu, 10 May 2018 17:29:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-rex-multiple-lines/m-p/395257#M169501</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2018-05-10T17:29:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to rex multiple lines</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-rex-multiple-lines/m-p/395258#M169502</link>
      <description>&lt;P&gt;Thanks woodcock, I used "| rex max_match=0 field=_raw "(?)Dest : (?.*)" | table path" in the end, but your suggestion to use "max_match=0" really helps!&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 19:31:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-rex-multiple-lines/m-p/395258#M169502</guid>
      <dc:creator>garujoey</dc:creator>
      <dc:date>2020-09-29T19:31:02Z</dc:date>
    </item>
  </channel>
</rss>

