<?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: Rex command to extract multiple values from base query in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Rex-command-to-extract-multiple-values-from-base-query/m-p/353568#M165394</link>
    <description>&lt;P&gt;Thanks for your help&lt;/P&gt;</description>
    <pubDate>Wed, 08 Nov 2017 16:53:24 GMT</pubDate>
    <dc:creator>k_harini</dc:creator>
    <dc:date>2017-11-08T16:53:24Z</dc:date>
    <item>
      <title>Rex command to extract multiple values from base query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Rex-command-to-extract-multiple-values-from-base-query/m-p/353566#M165392</link>
      <description>&lt;P&gt;I have below text and i need to extract "Successfully Sent" FTP Ipaddress and store number.  I could extract first portion post which it is not working. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="biztalk_idx" sourcetype="biztalk"|dedup Description|table Description|rex field=Description "(?&amp;lt;ExecutionStart&amp;gt;.* starting to execute)"|rex field=Description  "(?&amp;lt;SendSales&amp;gt;Sending sales.*)"|rex field=Description  "(?&amp;lt;SuccessSent&amp;gt;SUCCESSFULLY sent\s\w+)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;"Message SUCCESSFULLY sent to FTP &lt;A href="ftp://10.23.18.8:21/Foljesedel_171026152046_135060.xml"&gt;ftp://10.23.18.8:21/Foljesedel_171026152046_135060.xml&lt;/A&gt; for store: S135060."&lt;/P&gt;

&lt;P&gt;Also for extracting different fields from different values, do we have to add rex command each time or is there any other better way?&lt;BR /&gt;
 Can someone please help. Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 07 Nov 2017 06:35:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Rex-command-to-extract-multiple-values-from-base-query/m-p/353566#M165392</guid>
      <dc:creator>k_harini</dc:creator>
      <dc:date>2017-11-07T06:35:32Z</dc:date>
    </item>
    <item>
      <title>Re: Rex command to extract multiple values from base query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Rex-command-to-extract-multiple-values-from-base-query/m-p/353567#M165393</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/191898"&gt;@k_harini&lt;/a&gt;, based on the sample data provided, please try the following to use &lt;CODE&gt;rex&lt;/CODE&gt; to extract &lt;CODE&gt;ftp_address&lt;/CODE&gt; and &lt;CODE&gt;store_no&lt;/CODE&gt; fields.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|  rex field=Description "Message SUCCESSFULLY sent to FTP (?&amp;lt;ftp_address&amp;gt;ftp:\/\/[^\/]+)\/.*\sfor\sstore:\s(?&amp;lt;store_no&amp;gt;[^\.]+)\."
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Please use regex101.com for testing regular expression with your sample data. Following is run anywhere search based on your sample data:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|  makeresults
|  eval Description="Message SUCCESSFULLY sent to FTP ftp://10.23.18.8:21/Foljesedel_171026152046_135060.xml for store: S135060."
|  rex field=Description "Message SUCCESSFULLY sent to FTP (?&amp;lt;ftp_address&amp;gt;ftp:\/\/[^\/]+)\/.*\sfor\sstore:\s(?&amp;lt;store_no&amp;gt;[^\.]+)\."
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 29 Sep 2020 16:35:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Rex-command-to-extract-multiple-values-from-base-query/m-p/353567#M165393</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2020-09-29T16:35:03Z</dc:date>
    </item>
    <item>
      <title>Re: Rex command to extract multiple values from base query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Rex-command-to-extract-multiple-values-from-base-query/m-p/353568#M165394</link>
      <description>&lt;P&gt;Thanks for your help&lt;/P&gt;</description>
      <pubDate>Wed, 08 Nov 2017 16:53:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Rex-command-to-extract-multiple-values-from-base-query/m-p/353568#M165394</guid>
      <dc:creator>k_harini</dc:creator>
      <dc:date>2017-11-08T16:53:24Z</dc:date>
    </item>
  </channel>
</rss>

