<?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: How to edit my regular expression to extract numbers before key characters in my sample data? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-regular-expression-to-extract-numbers-before-key/m-p/267892#M80584</link>
    <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | rex "(?&amp;lt;numbers&amp;gt;\d+\.\d+)\s(GET|POST)" | table numbers
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 07 Sep 2016 20:04:23 GMT</pubDate>
    <dc:creator>sundareshr</dc:creator>
    <dc:date>2016-09-07T20:04:23Z</dc:date>
    <item>
      <title>How to edit my regular expression to extract numbers before key characters in my sample data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-regular-expression-to-extract-numbers-before-key/m-p/267891#M80583</link>
      <description>&lt;P&gt;I have this statement:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;10.211.1.114    10.222.3.33:4331    -   2016-09-07  14:10:06    0.004   GET /openapi-rest-web/akamai-object.htm -   200 6548    "Java/1.7.0_45" "54.444.444.444"    -   null    [corRID::null]  [KEY::-HTTPMonitor-Loyalty] [UID::-]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I am trying to grab the 0.004&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;10.200.1.200    10.002.0.98:012 -   2016-09-07  14:40:06    0.39    POST    /openapi-rest-web/v1/kohlsCash  -   200 918 "Apache-HttpClient/4.3.3 (java 1.5)"    "100.100.00.187, 144.41.141.00, 144.41.141.44, 54.009.200.002, 144.41.141.44"   -   null    [corRID::NAID-iOS-98797AB9-2978-4987-90CA-059879789-1473276124.978987]  [KEY::NUNlVg4532432523mLL8MEpqVvxW9]    [UID::-]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I am trying to grab the 0.39&lt;/P&gt;

&lt;P&gt;I have this regular expression so far: &lt;CODE&gt;^.*(GET|POST)&lt;/CODE&gt;&lt;BR /&gt;
Which gets me everything before the GET or POST&lt;/P&gt;

&lt;P&gt;Any suggestions?&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2016 19:54:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-regular-expression-to-extract-numbers-before-key/m-p/267891#M80583</guid>
      <dc:creator>JoshuaJohn</dc:creator>
      <dc:date>2016-09-07T19:54:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my regular expression to extract numbers before key characters in my sample data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-regular-expression-to-extract-numbers-before-key/m-p/267892#M80584</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | rex "(?&amp;lt;numbers&amp;gt;\d+\.\d+)\s(GET|POST)" | table numbers
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 07 Sep 2016 20:04:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-regular-expression-to-extract-numbers-before-key/m-p/267892#M80584</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-09-07T20:04:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my regular expression to extract numbers before key characters in my sample data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-regular-expression-to-extract-numbers-before-key/m-p/267893#M80585</link>
      <description>&lt;P&gt;Doesn't seem to work sorry, only getting blank null entries using that&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2016 20:22:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-regular-expression-to-extract-numbers-before-key/m-p/267893#M80585</guid>
      <dc:creator>JoshuaJohn</dc:creator>
      <dc:date>2016-09-07T20:22:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my regular expression to extract numbers before key characters in my sample data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-regular-expression-to-extract-numbers-before-key/m-p/267894#M80586</link>
      <description>&lt;P&gt;This should do it&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your base search | rex "^(\S+\s+){5}(?&amp;lt;YourFieldName&amp;gt;\S+)"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 07 Sep 2016 20:25:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-regular-expression-to-extract-numbers-before-key/m-p/267894#M80586</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-09-07T20:25:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my regular expression to extract numbers before key characters in my sample data?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-regular-expression-to-extract-numbers-before-key/m-p/267895#M80587</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;| rex "(?\d+\.\d+)\s(GET|POST)" | where match(response_time,"[a-zA-Z0-9]")| table response_time
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This did it&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2016 20:26:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-regular-expression-to-extract-numbers-before-key/m-p/267895#M80587</guid>
      <dc:creator>JoshuaJohn</dc:creator>
      <dc:date>2016-09-07T20:26:03Z</dc:date>
    </item>
  </channel>
</rss>

