<?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: regex:  replace my events with _raw=Body in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/regex-replace-my-events-with-raw-Body/m-p/352226#M104237</link>
    <description>&lt;P&gt;can you provide sample events and what is expected output?&lt;/P&gt;</description>
    <pubDate>Wed, 14 Mar 2018 10:41:57 GMT</pubDate>
    <dc:creator>493669</dc:creator>
    <dc:date>2018-03-14T10:41:57Z</dc:date>
    <item>
      <title>regex:  replace my events with _raw=Body</title>
      <link>https://community.splunk.com/t5/Splunk-Search/regex-replace-my-events-with-raw-Body/m-p/352225#M104236</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I want to replace my events with _raw=Body &lt;BR /&gt;
can anyone help ? pl let me know the regex .&lt;/P&gt;

&lt;P&gt;Regards&lt;BR /&gt;
Shraddha&lt;/P&gt;</description>
      <pubDate>Wed, 14 Mar 2018 10:38:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/regex-replace-my-events-with-raw-Body/m-p/352225#M104236</guid>
      <dc:creator>Mohsin123</dc:creator>
      <dc:date>2018-03-14T10:38:36Z</dc:date>
    </item>
    <item>
      <title>Re: regex:  replace my events with _raw=Body</title>
      <link>https://community.splunk.com/t5/Splunk-Search/regex-replace-my-events-with-raw-Body/m-p/352226#M104237</link>
      <description>&lt;P&gt;can you provide sample events and what is expected output?&lt;/P&gt;</description>
      <pubDate>Wed, 14 Mar 2018 10:41:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/regex-replace-my-events-with-raw-Body/m-p/352226#M104237</guid>
      <dc:creator>493669</dc:creator>
      <dc:date>2018-03-14T10:41:57Z</dc:date>
    </item>
    <item>
      <title>Re: regex:  replace my events with _raw=Body</title>
      <link>https://community.splunk.com/t5/Splunk-Search/regex-replace-my-events-with-raw-Body/m-p/352227#M104238</link>
      <description>&lt;P&gt;it seems previous comments are deleted :&lt;BR /&gt;
have you tried:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;...|rex "\nBody:\s(?&amp;lt;_raw&amp;gt;[^\}]+)"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 14 Mar 2018 11:58:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/regex-replace-my-events-with-raw-Body/m-p/352227#M104238</guid>
      <dc:creator>493669</dc:creator>
      <dc:date>2018-03-14T11:58:37Z</dc:date>
    </item>
    <item>
      <title>Re: regex:  replace my events with _raw=Body</title>
      <link>https://community.splunk.com/t5/Splunk-Search/regex-replace-my-events-with-raw-Body/m-p/352228#M104239</link>
      <description>&lt;P&gt;I asked you how we can rewrite event at HF level, so that data come only having Body data.&lt;/P&gt;

&lt;P&gt;You are giving me query I gave you &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Mar 2018 06:52:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/regex-replace-my-events-with-raw-Body/m-p/352228#M104239</guid>
      <dc:creator>Mohsin123</dc:creator>
      <dc:date>2018-03-15T06:52:33Z</dc:date>
    </item>
    <item>
      <title>Re: regex:  replace my events with _raw=Body</title>
      <link>https://community.splunk.com/t5/Splunk-Search/regex-replace-my-events-with-raw-Body/m-p/352229#M104240</link>
      <description>&lt;P&gt;You can use route and filter on HF. Refer below data:&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/7.0.2/Forwarding/Routeandfilterdatad"&gt;http://docs.splunk.com/Documentation/Splunk/7.0.2/Forwarding/Routeandfilterdatad&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;If you want to Anonymize you can use &lt;CODE&gt;SED-CMD&lt;/CODE&gt; &lt;BR /&gt;
&lt;A href="https://docs.splunk.com/Documentation/Splunk/7.0.2/Data/Anonymizedata"&gt;https://docs.splunk.com/Documentation/Splunk/7.0.2/Data/Anonymizedata&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Mar 2018 07:00:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/regex-replace-my-events-with-raw-Body/m-p/352229#M104240</guid>
      <dc:creator>p_gurav</dc:creator>
      <dc:date>2018-03-15T07:00:25Z</dc:date>
    </item>
    <item>
      <title>Re: regex:  replace my events with _raw=Body</title>
      <link>https://community.splunk.com/t5/Splunk-Search/regex-replace-my-events-with-raw-Body/m-p/352230#M104241</link>
      <description>&lt;P&gt;Assuming this is your regex for the field:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; ...|rex "\nBody:\s(?&amp;lt;_raw&amp;gt;[^\}]+)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;then I would do &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;....| regex field=_raw "\nBody:\s(?&amp;lt;new_raw&amp;gt;[^\}]+)"
| eval _raw=new_raw
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;please note that pre-extracted fields such as host, _time, sourcetype will still be there. you can always see time of the event even if it doesn't exist in new_raw.&lt;/P&gt;

&lt;P&gt;If you want to index from HF on this way, this will require you props.conf and transforms.conf. But that's not the question after all &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 20:29:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/regex-replace-my-events-with-raw-Body/m-p/352230#M104241</guid>
      <dc:creator>akocak</dc:creator>
      <dc:date>2020-09-29T20:29:06Z</dc:date>
    </item>
    <item>
      <title>Re: regex:  replace my events with _raw=Body</title>
      <link>https://community.splunk.com/t5/Splunk-Search/regex-replace-my-events-with-raw-Body/m-p/352231#M104242</link>
      <description>&lt;P&gt;Nobody is going to be able to answer your question or even give you much help unless you provide a great deal more detail, including samples of your existing data and a mockup of your desired final state.&lt;/P&gt;</description>
      <pubDate>Sun, 15 Jul 2018 14:33:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/regex-replace-my-events-with-raw-Body/m-p/352231#M104242</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2018-07-15T14:33:08Z</dc:date>
    </item>
  </channel>
</rss>

