<?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: Field extraction using rex in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Field-extraction-using-rex/m-p/522393#M147301</link>
    <description />
    <pubDate>Thu, 01 Oct 2020 02:53:08 GMT</pubDate>
    <dc:creator>avanijjain16</dc:creator>
    <dc:date>2020-10-01T02:53:08Z</dc:date>
    <item>
      <title>Field extraction using rex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-extraction-using-rex/m-p/521857#M147087</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am new to splunk, I am trying to extract specific message from my log event. The pattern I am looking from below message&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;[ERROR] 2020-09-28T11:50:06.108Z&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;6012c275-5df5-4839-95a0-260057509041&amp;nbsp; &amp;nbsp; &amp;nbsp;|HLX|&lt;FONT color="#0000FF"&gt;Task Failure Occured:{'jobid': 'FLOW-134', 'taskid': 'T-09', 'subtaskid': 'a88f6260-0180-11eb-9ccc-3e5cb494596a'}&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I need to extract everything after |HLX| and create another field. Its fine even if it includes |HLX|. I have tried multiple patterns but none are working. Any help would be appreciated.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="avanijjain16_0-1601311550636.png" style="width: 713px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/11014i677566CAE002913E/image-dimensions/713x38?v=v2" width="713" height="38" role="button" title="avanijjain16_0-1601311550636.png" alt="avanijjain16_0-1601311550636.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 16:53:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-extraction-using-rex/m-p/521857#M147087</guid>
      <dc:creator>avanijjain16</dc:creator>
      <dc:date>2020-09-28T16:53:51Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction using rex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-extraction-using-rex/m-p/521862#M147089</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/226706"&gt;@avanijjain16&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you try below regex-&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;|rex "HLX\|(?&amp;lt;fieldname&amp;gt;.+)"&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 28 Sep 2020 16:57:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-extraction-using-rex/m-p/521862#M147089</guid>
      <dc:creator>493669</dc:creator>
      <dc:date>2020-09-28T16:57:40Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction using rex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-extraction-using-rex/m-p/521867#M147090</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/226706"&gt;@avanijjain16&lt;/a&gt;&amp;nbsp;... i created a log event with your sample log and ran the rex from &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/206320"&gt;@493669&lt;/a&gt;&amp;nbsp;, it works fine.&amp;nbsp; you just have to use the field namev (if ur field name is _raw, simply run "|rex field=_raw.. ") and ".+" or ".*" - both are same.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;| makeresults 
| eval log="[ERROR] 2020-09-28T11:50:06.108Z 6012c275-5df5-4839-95a0-260057509041 |HLX|Task Failure Occured:{'jobid': 'FLOW-134', 'taskid': 'T-09', 'subtaskid': 'a88f6260-0180-11eb-9ccc-3e5cb494596a'}" 
| rex field=log "HLX\|(?&amp;lt;TaskStatus&amp;gt;.*)" 
| table TaskStatus&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="simple.jpg" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/11015iBE0A21CC85257114/image-size/large?v=v2&amp;amp;px=999" role="button" title="simple.jpg" alt="simple.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 17:30:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-extraction-using-rex/m-p/521867#M147090</guid>
      <dc:creator>inventsekar</dc:creator>
      <dc:date>2020-09-28T17:30:34Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction using rex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-extraction-using-rex/m-p/521884#M147094</link>
      <description>&lt;P&gt;So I did some search and found that it’s pre-pattern and then (? Creates new field name TaskStatus that follows HLX and matching with pattern .* (basically everything except /n) . I have some logs where there is chance of \n coming in. It would not match in those cases. Any idea how to allow that. \n can appear any where followed by HLX.&lt;/P&gt;&lt;PRE&gt;"HLX\|(?&amp;lt;TaskStatus&amp;gt;.*)" &lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 02:26:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-extraction-using-rex/m-p/521884#M147094</guid>
      <dc:creator>avanijjain16</dc:creator>
      <dc:date>2020-09-29T02:26:46Z</dc:date>
    </item>
    <item>
      <title>Re: Field extraction using rex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-extraction-using-rex/m-p/522393#M147301</link>
      <description />
      <pubDate>Thu, 01 Oct 2020 02:53:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-extraction-using-rex/m-p/522393#M147301</guid>
      <dc:creator>avanijjain16</dc:creator>
      <dc:date>2020-10-01T02:53:08Z</dc:date>
    </item>
  </channel>
</rss>

