<?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: What is a regular expression that ignores whitespace and text, and captures only numbers of varying lengths? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/What-is-a-regular-expression-that-ignores-whitespace-and-text/m-p/207035#M60335</link>
    <description>&lt;P&gt;Give this a shot&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;MemTotal\:\s+(?&amp;lt;MemoryTotal&amp;gt;[^\s]+)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 05 Aug 2016 15:24:18 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2016-08-05T15:24:18Z</dc:date>
    <item>
      <title>What is a regular expression that ignores whitespace and text, and captures only numbers of varying lengths?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-a-regular-expression-that-ignores-whitespace-and-text/m-p/207025#M60325</link>
      <description>&lt;P&gt;I'm trying to write a regular expression that will find only the numbers in the string of text below:&lt;/P&gt;

&lt;P&gt;MemTotal:       16328352 kB&lt;/P&gt;

&lt;P&gt;I don't want the alphabetical or whitespace characters. I just want (in this example) "16328352".&lt;/P&gt;

&lt;P&gt;I can't find a specification on a regular expression that will ignore certain data types, however.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Aug 2016 14:56:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-a-regular-expression-that-ignores-whitespace-and-text/m-p/207025#M60325</guid>
      <dc:creator>Lucas_Henry_</dc:creator>
      <dc:date>2016-08-05T14:56:07Z</dc:date>
    </item>
    <item>
      <title>Re: What is a regular expression that ignores whitespace and text, and captures only numbers of varying lengths?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-a-regular-expression-that-ignores-whitespace-and-text/m-p/207026#M60326</link>
      <description>&lt;P&gt;Try &lt;CODE&gt;"MemTotal: (?&amp;lt;memTotal&amp;gt;\d+)"&lt;/CODE&gt;.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Aug 2016 15:00:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-a-regular-expression-that-ignores-whitespace-and-text/m-p/207026#M60326</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2016-08-05T15:00:32Z</dc:date>
    </item>
    <item>
      <title>Re: What is a regular expression that ignores whitespace and text, and captures only numbers of varying lengths?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-a-regular-expression-that-ignores-whitespace-and-text/m-p/207027#M60327</link>
      <description>&lt;P&gt;Try this &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;... | rex (?P&amp;lt;MemTotal&amp;gt;(?&amp;lt;=MemTotal\:\s)\d+(?=\s\w{2}))&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Aug 2016 15:00:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-a-regular-expression-that-ignores-whitespace-and-text/m-p/207027#M60327</guid>
      <dc:creator>skoelpin</dc:creator>
      <dc:date>2016-08-05T15:00:43Z</dc:date>
    </item>
    <item>
      <title>Re: What is a regular expression that ignores whitespace and text, and captures only numbers of varying lengths?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-a-regular-expression-that-ignores-whitespace-and-text/m-p/207028#M60328</link>
      <description>&lt;P&gt;What would this look like if I were to plug it into the field extractor tool?&lt;/P&gt;</description>
      <pubDate>Fri, 05 Aug 2016 15:08:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-a-regular-expression-that-ignores-whitespace-and-text/m-p/207028#M60328</guid>
      <dc:creator>Lucas_Henry_</dc:creator>
      <dc:date>2016-08-05T15:08:36Z</dc:date>
    </item>
    <item>
      <title>Re: What is a regular expression that ignores whitespace and text, and captures only numbers of varying lengths?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-a-regular-expression-that-ignores-whitespace-and-text/m-p/207029#M60329</link>
      <description>&lt;P&gt;No dice. It didn't extract anything.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Aug 2016 15:09:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-a-regular-expression-that-ignores-whitespace-and-text/m-p/207029#M60329</guid>
      <dc:creator>Lucas_Henry_</dc:creator>
      <dc:date>2016-08-05T15:09:29Z</dc:date>
    </item>
    <item>
      <title>Re: What is a regular expression that ignores whitespace and text, and captures only numbers of varying lengths?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-a-regular-expression-that-ignores-whitespace-and-text/m-p/207030#M60330</link>
      <description>&lt;P&gt;Like this &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;(?P&amp;lt;MemTotal&amp;gt;(?&amp;lt;=MemTotal\:\s)\d+(?=\s\w{2}))&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Aug 2016 15:10:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-a-regular-expression-that-ignores-whitespace-and-text/m-p/207030#M60330</guid>
      <dc:creator>skoelpin</dc:creator>
      <dc:date>2016-08-05T15:10:23Z</dc:date>
    </item>
    <item>
      <title>Re: What is a regular expression that ignores whitespace and text, and captures only numbers of varying lengths?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-a-regular-expression-that-ignores-whitespace-and-text/m-p/207031#M60331</link>
      <description>&lt;P&gt;Still nothing, unfortunately. &lt;/P&gt;

&lt;P&gt;If it helps, the amount of whitespace and the number of integers will vary between records.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Aug 2016 15:13:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-a-regular-expression-that-ignores-whitespace-and-text/m-p/207031#M60331</guid>
      <dc:creator>Lucas_Henry_</dc:creator>
      <dc:date>2016-08-05T15:13:44Z</dc:date>
    </item>
    <item>
      <title>Re: What is a regular expression that ignores whitespace and text, and captures only numbers of varying lengths?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-a-regular-expression-that-ignores-whitespace-and-text/m-p/207032#M60332</link>
      <description>&lt;P&gt;Did you use it in a &lt;CODE&gt;rex&lt;/CODE&gt; command?&lt;/P&gt;</description>
      <pubDate>Fri, 05 Aug 2016 15:13:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-a-regular-expression-that-ignores-whitespace-and-text/m-p/207032#M60332</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2016-08-05T15:13:53Z</dc:date>
    </item>
    <item>
      <title>Re: What is a regular expression that ignores whitespace and text, and captures only numbers of varying lengths?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-a-regular-expression-that-ignores-whitespace-and-text/m-p/207033#M60333</link>
      <description>&lt;P&gt;No. I'm trying to use the field extractor because the info is for a non-dev unit&lt;/P&gt;</description>
      <pubDate>Fri, 05 Aug 2016 15:14:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-a-regular-expression-that-ignores-whitespace-and-text/m-p/207033#M60333</guid>
      <dc:creator>Lucas_Henry_</dc:creator>
      <dc:date>2016-08-05T15:14:35Z</dc:date>
    </item>
    <item>
      <title>Re: What is a regular expression that ignores whitespace and text, and captures only numbers of varying lengths?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-a-regular-expression-that-ignores-whitespace-and-text/m-p/207034#M60334</link>
      <description>&lt;P&gt;edit  - tried this and its working good.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=rexmemtotal | rex field=_raw "(MemTotal:\s+(?P&amp;lt;rexmemtotal&amp;gt;\d+))" | table rexmemtotal _raw
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 05 Aug 2016 15:20:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-a-regular-expression-that-ignores-whitespace-and-text/m-p/207034#M60334</guid>
      <dc:creator>inventsekar</dc:creator>
      <dc:date>2016-08-05T15:20:34Z</dc:date>
    </item>
    <item>
      <title>Re: What is a regular expression that ignores whitespace and text, and captures only numbers of varying lengths?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-a-regular-expression-that-ignores-whitespace-and-text/m-p/207035#M60335</link>
      <description>&lt;P&gt;Give this a shot&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;MemTotal\:\s+(?&amp;lt;MemoryTotal&amp;gt;[^\s]+)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 05 Aug 2016 15:24:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-a-regular-expression-that-ignores-whitespace-and-text/m-p/207035#M60335</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-08-05T15:24:18Z</dc:date>
    </item>
    <item>
      <title>Re: What is a regular expression that ignores whitespace and text, and captures only numbers of varying lengths?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-a-regular-expression-that-ignores-whitespace-and-text/m-p/207036#M60336</link>
      <description>&lt;P&gt;Ahh yeah the amount of whitespace mattered, but this should work &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;(?P&amp;lt;MemTotal&amp;gt;MemTotal\:\s+(?&amp;lt;MemoryTotal&amp;gt;[^\s]+))&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Aug 2016 15:31:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-a-regular-expression-that-ignores-whitespace-and-text/m-p/207036#M60336</guid>
      <dc:creator>skoelpin</dc:creator>
      <dc:date>2016-08-05T15:31:25Z</dc:date>
    </item>
    <item>
      <title>Re: What is a regular expression that ignores whitespace and text, and captures only numbers of varying lengths?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-a-regular-expression-that-ignores-whitespace-and-text/m-p/207037#M60337</link>
      <description>&lt;P&gt;splunk document link for rex learning&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.4.2/Knowledge/AboutSplunkregularexpressions"&gt;http://docs.splunk.com/Documentation/Splunk/6.4.2/Knowledge/AboutSplunkregularexpressions&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.4.2/SearchReference/Rex"&gt;http://docs.splunk.com/Documentation/Splunk/6.4.2/SearchReference/Rex&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Aug 2016 15:41:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-a-regular-expression-that-ignores-whitespace-and-text/m-p/207037#M60337</guid>
      <dc:creator>inventsekar</dc:creator>
      <dc:date>2016-08-05T15:41:11Z</dc:date>
    </item>
    <item>
      <title>Re: What is a regular expression that ignores whitespace and text, and captures only numbers of varying lengths?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-a-regular-expression-that-ignores-whitespace-and-text/m-p/207038#M60338</link>
      <description>&lt;P&gt;You already have 4 options, why not one more &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;MemTotal:\s*(?&amp;lt;mem&amp;gt;\d+)"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 05 Aug 2016 17:41:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-a-regular-expression-that-ignores-whitespace-and-text/m-p/207038#M60338</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-08-05T17:41:57Z</dc:date>
    </item>
  </channel>
</rss>

