<?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 regex help in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/regex-help/m-p/502745#M139905</link>
    <description>&lt;P&gt;{"device":"abcd","host":"1.2.3.4"}&lt;BR /&gt;
{"device":"efgh [ = ILO = ]","host":"2.3.4.5"}&lt;BR /&gt;
{"device":"qrst - [ab cd ef]","host":"4.5.6.7"}&lt;/P&gt;

&lt;P&gt;My data looks like this in the _raw.&lt;/P&gt;

&lt;P&gt;now i am trying to fetch device and host using regex. please help. It should be simple but since host is a default keyword the host from which data is coming is also coming with field name host so i need to rename host coming in _raw to ip&lt;/P&gt;</description>
    <pubDate>Tue, 19 May 2020 09:38:43 GMT</pubDate>
    <dc:creator>surekhasplunk</dc:creator>
    <dc:date>2020-05-19T09:38:43Z</dc:date>
    <item>
      <title>regex help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/regex-help/m-p/502745#M139905</link>
      <description>&lt;P&gt;{"device":"abcd","host":"1.2.3.4"}&lt;BR /&gt;
{"device":"efgh [ = ILO = ]","host":"2.3.4.5"}&lt;BR /&gt;
{"device":"qrst - [ab cd ef]","host":"4.5.6.7"}&lt;/P&gt;

&lt;P&gt;My data looks like this in the _raw.&lt;/P&gt;

&lt;P&gt;now i am trying to fetch device and host using regex. please help. It should be simple but since host is a default keyword the host from which data is coming is also coming with field name host so i need to rename host coming in _raw to ip&lt;/P&gt;</description>
      <pubDate>Tue, 19 May 2020 09:38:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/regex-help/m-p/502745#M139905</guid>
      <dc:creator>surekhasplunk</dc:creator>
      <dc:date>2020-05-19T09:38:43Z</dc:date>
    </item>
    <item>
      <title>Re: regex help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/regex-help/m-p/502746#M139906</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;Try this rex&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|rex "\"device\"\:\"(?P&amp;lt;device&amp;gt;[^"]+)\"\,\"host\"\:\"(?P&amp;lt;ip&amp;gt;[^"]+)"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 19 May 2020 09:55:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/regex-help/m-p/502746#M139906</guid>
      <dc:creator>vnravikumar</dc:creator>
      <dc:date>2020-05-19T09:55:28Z</dc:date>
    </item>
    <item>
      <title>Re: regex help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/regex-help/m-p/502747#M139907</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;|makeresults
| eval _raw="{\"device\":\"abcd\",\"host\":\"1.2.3.4\"}
{\"device\":\"efgh [ = ILO = ]\",\"host\":\"2.3.4.5\"}
{\"device\":\"qrst - [ab cd ef]\",\"host\":\"4.5.6.7\"}"
| multikv noheader=t
| fields _raw
| spath
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 19 May 2020 10:26:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/regex-help/m-p/502747#M139907</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-05-19T10:26:48Z</dc:date>
    </item>
  </channel>
</rss>

