<?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: regex help in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/regex-help/m-p/281564#M84978</link>
    <description>&lt;P&gt;Try this instead:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;rex "db time (?&amp;lt;time&amp;gt;[\d\,]+)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you want something more robust that supports decimals with both comma and dot try this instead (not tested but logic is fine):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex "db time (?&amp;lt;time1&amp;gt;\d+)[\,\.]?(?&amp;lt;time2&amp;gt;\d+)?"
| eval time = time1 . time2
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 15 Feb 2016 14:03:05 GMT</pubDate>
    <dc:creator>javiergn</dc:creator>
    <dc:date>2016-02-15T14:03:05Z</dc:date>
    <item>
      <title>regex help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/regex-help/m-p/281563#M84977</link>
      <description>&lt;P&gt;I have following as raw events &lt;/P&gt;

&lt;P&gt;Message=Total db time 272 seconds&lt;BR /&gt;
Message=Total db time 2,272 seconds&lt;BR /&gt;
Message=Total db time 32,272 seconds&lt;/P&gt;

&lt;P&gt;I am able to extract the digit via regex, but unable to modify the regex to include numbers separated with comma. Any help appreciated. &lt;/P&gt;

&lt;P&gt;Here is my current regex &lt;BR /&gt;
rex "db time (?\d*)" -- This extracts the value 272, but not the other numbers with commas.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Feb 2016 13:52:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/regex-help/m-p/281563#M84977</guid>
      <dc:creator>saurabhkunte</dc:creator>
      <dc:date>2016-02-15T13:52:52Z</dc:date>
    </item>
    <item>
      <title>Re: regex help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/regex-help/m-p/281564#M84978</link>
      <description>&lt;P&gt;Try this instead:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;rex "db time (?&amp;lt;time&amp;gt;[\d\,]+)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you want something more robust that supports decimals with both comma and dot try this instead (not tested but logic is fine):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex "db time (?&amp;lt;time1&amp;gt;\d+)[\,\.]?(?&amp;lt;time2&amp;gt;\d+)?"
| eval time = time1 . time2
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 15 Feb 2016 14:03:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/regex-help/m-p/281564#M84978</guid>
      <dc:creator>javiergn</dc:creator>
      <dc:date>2016-02-15T14:03:05Z</dc:date>
    </item>
    <item>
      <title>Re: regex help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/regex-help/m-p/281565#M84979</link>
      <description>&lt;P&gt;Many thanks, this works very well.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Feb 2016 14:21:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/regex-help/m-p/281565#M84979</guid>
      <dc:creator>saurabhkunte</dc:creator>
      <dc:date>2016-02-15T14:21:13Z</dc:date>
    </item>
  </channel>
</rss>

