<?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 REX in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/REX/m-p/524737#M9393</link>
    <description>&lt;P&gt;Hello,&amp;nbsp; I'm not so good with REX formula, if someone can help me and give me some tip for next time, I appreciate, thanks.&lt;/P&gt;&lt;P&gt;I need to extract the balance (50446.50), the info is in field1&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;'&lt;/SPAN&gt;&lt;SPAN class="t"&gt;Col1&lt;/SPAN&gt;&lt;SPAN&gt;' &lt;/SPAN&gt;&lt;SPAN class="t"&gt;Endpoint&lt;/SPAN&gt;&lt;SPAN&gt;[&lt;/SPAN&gt;&lt;SPAN class="t"&gt;442&lt;/SPAN&gt;&lt;SPAN&gt;] '&lt;/SPAN&gt;&lt;SPAN class="t"&gt;DO&lt;/SPAN&gt;&lt;SPAN&gt;' &lt;/SPAN&gt;&lt;SPAN class="t"&gt;Wallet&lt;/SPAN&gt;&lt;SPAN&gt;[&lt;/SPAN&gt;&lt;SPAN class="t"&gt;501&lt;/SPAN&gt;&lt;SPAN&gt;] '&lt;/SPAN&gt;&lt;SPAN class="t"&gt;Trilogy&lt;/SPAN&gt;&lt;SPAN&gt;' &lt;/SPAN&gt;&lt;SPAN class="t a"&gt;&lt;SPAN class="t"&gt;Balance&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt; '&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN class="t"&gt;50446.50&lt;/SPAN&gt;&lt;/STRONG&gt;&amp;nbsp;&lt;SPAN class="t"&gt;USD'&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 14 Oct 2020 21:45:36 GMT</pubDate>
    <dc:creator>edfigue88</dc:creator>
    <dc:date>2020-10-14T21:45:36Z</dc:date>
    <item>
      <title>REX</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/REX/m-p/524737#M9393</link>
      <description>&lt;P&gt;Hello,&amp;nbsp; I'm not so good with REX formula, if someone can help me and give me some tip for next time, I appreciate, thanks.&lt;/P&gt;&lt;P&gt;I need to extract the balance (50446.50), the info is in field1&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;'&lt;/SPAN&gt;&lt;SPAN class="t"&gt;Col1&lt;/SPAN&gt;&lt;SPAN&gt;' &lt;/SPAN&gt;&lt;SPAN class="t"&gt;Endpoint&lt;/SPAN&gt;&lt;SPAN&gt;[&lt;/SPAN&gt;&lt;SPAN class="t"&gt;442&lt;/SPAN&gt;&lt;SPAN&gt;] '&lt;/SPAN&gt;&lt;SPAN class="t"&gt;DO&lt;/SPAN&gt;&lt;SPAN&gt;' &lt;/SPAN&gt;&lt;SPAN class="t"&gt;Wallet&lt;/SPAN&gt;&lt;SPAN&gt;[&lt;/SPAN&gt;&lt;SPAN class="t"&gt;501&lt;/SPAN&gt;&lt;SPAN&gt;] '&lt;/SPAN&gt;&lt;SPAN class="t"&gt;Trilogy&lt;/SPAN&gt;&lt;SPAN&gt;' &lt;/SPAN&gt;&lt;SPAN class="t a"&gt;&lt;SPAN class="t"&gt;Balance&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt; '&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN class="t"&gt;50446.50&lt;/SPAN&gt;&lt;/STRONG&gt;&amp;nbsp;&lt;SPAN class="t"&gt;USD'&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Oct 2020 21:45:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/REX/m-p/524737#M9393</guid>
      <dc:creator>edfigue88</dc:creator>
      <dc:date>2020-10-14T21:45:36Z</dc:date>
    </item>
    <item>
      <title>Re: REX</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/REX/m-p/524740#M9394</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/227594"&gt;@edfigue88&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try this run anywhere example which shows your data and the necessary rex&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults
| eval field1="'Col1' Endpoint[442] 'DO' Wallet[501] 'Trilogy' Balance '50446.50 USD'"
| rex field=field1 "Balance\s'(?&amp;lt;Balance&amp;gt;[\d\.]+)"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Hope this helps&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Oct 2020 22:27:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/REX/m-p/524740#M9394</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2020-10-14T22:27:53Z</dc:date>
    </item>
    <item>
      <title>Re: REX</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/REX/m-p/524746#M9395</link>
      <description>&lt;P&gt;Yes, that work for me, if I want to have the "USD" in my results, what I need to change or include?&lt;/P&gt;</description>
      <pubDate>Wed, 14 Oct 2020 23:29:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/REX/m-p/524746#M9395</guid>
      <dc:creator>edfigue88</dc:creator>
      <dc:date>2020-10-14T23:29:16Z</dc:date>
    </item>
    <item>
      <title>Re: REX</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/REX/m-p/524748#M9396</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/6367"&gt;@bowesmana&lt;/a&gt;&amp;nbsp;can you help me with this change please&lt;/P&gt;</description>
      <pubDate>Thu, 15 Oct 2020 00:54:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/REX/m-p/524748#M9396</guid>
      <dc:creator>edfigue88</dc:creator>
      <dc:date>2020-10-15T00:54:04Z</dc:date>
    </item>
    <item>
      <title>Re: REX</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/REX/m-p/524749#M9397</link>
      <description>&lt;P&gt;You can either extract the currency as a separate field, like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults
| eval field1="'Col1' Endpoint[442] 'DO' Wallet[501] 'Trilogy' Balance '50446.50 USD'"
| rex field=field1 "Balance\s'(?&amp;lt;Balance&amp;gt;[\d\.]+)\s(?&amp;lt;Currency&amp;gt;\w+)"
| eval Amount=Balance." ".Currency&lt;/LI-CODE&gt;&lt;P&gt;and then you have Balance and Currency, which you can then join together again if you need, or you can extract it as part of the original Balance field like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex field=field1 "Balance\s'(?&amp;lt;Balance&amp;gt;[\d\.]+\s\w+)"&lt;/LI-CODE&gt;&lt;P&gt;The benefit of using the former approach is you can then use the numeric balance field if you want to make calculations, whereas with the currency as part of the field, you cannot.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Oct 2020 01:04:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/REX/m-p/524749#M9397</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2020-10-15T01:04:01Z</dc:date>
    </item>
    <item>
      <title>Re: REX</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/REX/m-p/524753#M9398</link>
      <description>&lt;P&gt;The regex101 is a good way to learn and play with regex&lt;/P&gt;&lt;P&gt;&lt;A href="https://regex101.com/" target="_blank"&gt;https://regex101.com/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Oct 2020 01:48:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/REX/m-p/524753#M9398</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2020-10-15T01:48:03Z</dc:date>
    </item>
  </channel>
</rss>

