<?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 Extract field with regex issue in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Extract-field-with-regex-issue/m-p/491747#M137241</link>
    <description>&lt;P&gt;I'm trying to only extract the value of 'value' with regex. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;2020-03-04 12:14:26,363 - measurement:34- sensor=43, value="0.034051", date="None"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I've tried this but it didn't work:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex field=value "(?&amp;lt;myValue&amp;gt;\d{3})" | search myValue=*
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Where did it go wrong and how do I solve this?&lt;/P&gt;</description>
    <pubDate>Wed, 06 May 2020 13:22:26 GMT</pubDate>
    <dc:creator>j3r0n</dc:creator>
    <dc:date>2020-05-06T13:22:26Z</dc:date>
    <item>
      <title>Extract field with regex issue</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-field-with-regex-issue/m-p/491747#M137241</link>
      <description>&lt;P&gt;I'm trying to only extract the value of 'value' with regex. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;2020-03-04 12:14:26,363 - measurement:34- sensor=43, value="0.034051", date="None"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I've tried this but it didn't work:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex field=value "(?&amp;lt;myValue&amp;gt;\d{3})" | search myValue=*
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Where did it go wrong and how do I solve this?&lt;/P&gt;</description>
      <pubDate>Wed, 06 May 2020 13:22:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-field-with-regex-issue/m-p/491747#M137241</guid>
      <dc:creator>j3r0n</dc:creator>
      <dc:date>2020-05-06T13:22:26Z</dc:date>
    </item>
    <item>
      <title>Re: Extract field with regex issue</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-field-with-regex-issue/m-p/491748#M137242</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;Check this rex&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;value="(?P&amp;lt;value&amp;gt;[^"]+)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 06 May 2020 13:31:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-field-with-regex-issue/m-p/491748#M137242</guid>
      <dc:creator>vnravikumar</dc:creator>
      <dc:date>2020-05-06T13:31:21Z</dc:date>
    </item>
    <item>
      <title>Re: Extract field with regex issue</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-field-with-regex-issue/m-p/491749#M137243</link>
      <description>&lt;P&gt;&lt;CODE&gt;rex&lt;/CODE&gt; is not needed to extract that value.  Splunk automatically extracts data in &lt;CODE&gt;field=value&lt;/CODE&gt; format so you should already have a field called "value" with a value of "0.034051".&lt;/P&gt;

&lt;P&gt;If, for some reason, you still want/need to use &lt;CODE&gt;rex&lt;/CODE&gt;, then the regex string you've used is expecting the value be exactly 3 digits ('\d{3}'), which is not the case with the example event.  Try &lt;CODE&gt;\d+\.\d+&lt;/CODE&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 06 May 2020 13:33:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-field-with-regex-issue/m-p/491749#M137243</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-05-06T13:33:00Z</dc:date>
    </item>
  </channel>
</rss>

