<?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 How to extract trailing numbers from a string with rex in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-trailing-numbers-from-a-string-with-rex/m-p/462572#M130417</link>
    <description>&lt;P&gt;I'm trying to extract a string (alphabets and underscore) from a given string which can contain any number of numeric values in the end.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; rex field=_raw "type: (?.*)\d*$"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;ex. &lt;BR /&gt;
type: alphabets123 | &lt;STRONG&gt;alphabet&lt;/STRONG&gt;&lt;BR /&gt;
type: extract1           | &lt;STRONG&gt;extract&lt;/STRONG&gt;&lt;BR /&gt;
type: write_regex23| &lt;STRONG&gt;write_regex&lt;/STRONG&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 30 Sep 2020 01:54:33 GMT</pubDate>
    <dc:creator>hmbisht</dc:creator>
    <dc:date>2020-09-30T01:54:33Z</dc:date>
    <item>
      <title>How to extract trailing numbers from a string with rex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-trailing-numbers-from-a-string-with-rex/m-p/462572#M130417</link>
      <description>&lt;P&gt;I'm trying to extract a string (alphabets and underscore) from a given string which can contain any number of numeric values in the end.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; rex field=_raw "type: (?.*)\d*$"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;ex. &lt;BR /&gt;
type: alphabets123 | &lt;STRONG&gt;alphabet&lt;/STRONG&gt;&lt;BR /&gt;
type: extract1           | &lt;STRONG&gt;extract&lt;/STRONG&gt;&lt;BR /&gt;
type: write_regex23| &lt;STRONG&gt;write_regex&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 01:54:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-trailing-numbers-from-a-string-with-rex/m-p/462572#M130417</guid>
      <dc:creator>hmbisht</dc:creator>
      <dc:date>2020-09-30T01:54:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract trailing numbers from a string with rex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-trailing-numbers-from-a-string-with-rex/m-p/462573#M130418</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;| makeresults 
|  eval x="type: write_regex23" 
 | rex field=x "\:+(?&amp;lt;extract&amp;gt;.*?)\d+"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;replace x by your source field and remove makeresults&lt;/P&gt;</description>
      <pubDate>Tue, 27 Aug 2019 18:51:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-trailing-numbers-from-a-string-with-rex/m-p/462573#M130418</guid>
      <dc:creator>Sukisen1981</dc:creator>
      <dc:date>2019-08-27T18:51:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract trailing numbers from a string with rex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-trailing-numbers-from-a-string-with-rex/m-p/462574#M130419</link>
      <description>&lt;P&gt;hi @hmbisht &lt;BR /&gt;
Please accept the anser if it significantly helped resolve your issue or let us know if there are any more issues&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2019 18:50:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-trailing-numbers-from-a-string-with-rex/m-p/462574#M130419</guid>
      <dc:creator>Sukisen1981</dc:creator>
      <dc:date>2019-08-28T18:50:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract trailing numbers from a string with rex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-trailing-numbers-from-a-string-with-rex/m-p/462575#M130420</link>
      <description>&lt;P&gt;Thanks a lot @Sukisen1981&lt;/P&gt;</description>
      <pubDate>Thu, 29 Aug 2019 00:22:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-trailing-numbers-from-a-string-with-rex/m-p/462575#M130420</guid>
      <dc:creator>hmbisht</dc:creator>
      <dc:date>2019-08-29T00:22:19Z</dc:date>
    </item>
  </channel>
</rss>

