<?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 insert empty lines in the field before and after a specific pattern? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-insert-empty-lines-in-the-field-before-and-after-a/m-p/491363#M194221</link>
    <description>&lt;P&gt;Try &lt;CODE&gt;"s/(\*+ MEMORY \*+)/\nn\1\n/"&lt;/CODE&gt;.&lt;/P&gt;</description>
    <pubDate>Tue, 19 Nov 2019 21:17:49 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2019-11-19T21:17:49Z</dc:date>
    <item>
      <title>How to insert empty lines in the field before and after a specific pattern?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-insert-empty-lines-in-the-field-before-and-after-a/m-p/491359#M194217</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I have a column / field called LINE that consists of the several text lines.&lt;BR /&gt;
I would like to format it a bit before I present it to the end users in the alert using $result.LINE$.&lt;BR /&gt;
I have there the following header line:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;****************************
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and I would like to insert two empty lines before and one empty line below of it into the LINE field.&lt;/P&gt;

&lt;P&gt;How would I do it?&lt;/P&gt;

&lt;P&gt;Kind Regards,&lt;BR /&gt;
Kamil&lt;/P&gt;</description>
      <pubDate>Tue, 19 Nov 2019 15:58:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-insert-empty-lines-in-the-field-before-and-after-a/m-p/491359#M194217</guid>
      <dc:creator>damucka</dc:creator>
      <dc:date>2019-11-19T15:58:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to insert empty lines in the field before and after a specific pattern?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-insert-empty-lines-in-the-field-before-and-after-a/m-p/491360#M194218</link>
      <description>&lt;P&gt;Try &lt;CODE&gt;rex&lt;/CODE&gt;.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | rex field=LINE mode=sed "s/(\*{28})/\n\n\1\n/"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 19 Nov 2019 16:25:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-insert-empty-lines-in-the-field-before-and-after-a/m-p/491360#M194218</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2019-11-19T16:25:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to insert empty lines in the field before and after a specific pattern?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-insert-empty-lines-in-the-field-before-and-after-a/m-p/491361#M194219</link>
      <description>&lt;P&gt;Thank you.&lt;BR /&gt;
This would do what I want. One more question, how would the sed for the following header line look like?&lt;BR /&gt;
 ... I am struggling with it a bit in regex101&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;******************************* MEMORY *************************************
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 19 Nov 2019 19:21:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-insert-empty-lines-in-the-field-before-and-after-a/m-p/491361#M194219</guid>
      <dc:creator>damucka</dc:creator>
      <dc:date>2019-11-19T19:21:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to insert empty lines in the field before and after a specific pattern?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-insert-empty-lines-in-the-field-before-and-after-a/m-p/491362#M194220</link>
      <description>&lt;P&gt;It would be best if you let each question stand alone, as well as state what you tried. However, try this:&lt;BR /&gt;
&lt;A href="https://regex101.com/r/xPYiLc/1"&gt;https://regex101.com/r/xPYiLc/1&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Nov 2019 21:16:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-insert-empty-lines-in-the-field-before-and-after-a/m-p/491362#M194220</guid>
      <dc:creator>efavreau</dc:creator>
      <dc:date>2019-11-19T21:16:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to insert empty lines in the field before and after a specific pattern?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-insert-empty-lines-in-the-field-before-and-after-a/m-p/491363#M194221</link>
      <description>&lt;P&gt;Try &lt;CODE&gt;"s/(\*+ MEMORY \*+)/\nn\1\n/"&lt;/CODE&gt;.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Nov 2019 21:17:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-insert-empty-lines-in-the-field-before-and-after-a/m-p/491363#M194221</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2019-11-19T21:17:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to insert empty lines in the field before and after a specific pattern?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-insert-empty-lines-in-the-field-before-and-after-a/m-p/491364#M194222</link>
      <description>&lt;P&gt;Also, @damucka make sure you accept the answer.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Nov 2019 21:19:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-insert-empty-lines-in-the-field-before-and-after-a/m-p/491364#M194222</guid>
      <dc:creator>efavreau</dc:creator>
      <dc:date>2019-11-19T21:19:17Z</dc:date>
    </item>
  </channel>
</rss>

