<?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 not pulling out all values in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Regex-not-pulling-out-all-values/m-p/79734#M20173</link>
    <description>&lt;P&gt;It's one bit chunk just like this in the log&lt;/P&gt;</description>
    <pubDate>Fri, 28 Jun 2013 16:34:40 GMT</pubDate>
    <dc:creator>gnovak</dc:creator>
    <dc:date>2013-06-28T16:34:40Z</dc:date>
    <item>
      <title>Regex not pulling out all values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-not-pulling-out-all-values/m-p/79732#M20171</link>
      <description>&lt;P&gt;This really has me stumped.  Not sure why this isn't working.  I've got data in a log that looks like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    --- [1 - main] 2013-06-28/15:43:10.954 [00:00:00.182]
INFO: output files:
      Log Text File: /var/www/html/2013-06-28-15-43-10-script4.log.txt
      Log JSON File: /var/www/html/2013-06-28-15-43-10-script4.log.json
         Event File: /var/www/html/2013-06-28-15-43-10-script4.events.json
       Summary File: /var/www/html/2013-06-28-15-43-10-script4.summary.json
--- [1 - main] 2013-06-28/15:43:10.964 [00:00:00.191]
INFO: Script 4: &lt;A href="https://www.nottellingyouthisinfo.com/page" target="test_blank"&gt;https://www.nottellingyouthisinfo.com/page&lt;/A&gt;
 Users: 1
--- [1 - main] 2013-06-28/15:43:10.984 [00:00:00.213]
INFO: all threads started.
   size: 1
  group: Dropdown Thread Group
--- [10 - Thread-1] 2013-06-28/15:43:16.009 [00:00:05.236]
INFO: snapshot
[EVENTS]
            Event      OK         Avg       Dev      Min      Max     Err
  1:        Login       1     1979.00       NaN     1979     1979       0 [0.00%]
  2: Basic Search       1      848.00       NaN      848      848       0 [0.00%]
[ERRORS]
   &amp;lt;&amp;lt; no errors &amp;gt;&amp;gt;
--- [1 - main] 2013-06-28/15:43:18.121 [00:00:07.349]
INFO: Run complete: 00:00:07.204
[EVENTS]
                     Event      OK         Avg       Dev      Min      Max     Err
  1:             Full Path       1     6973.00       NaN     6973     6973       0 [0.00%]
  2:                 Login       1     1979.00       NaN     1979     1979       0 [0.00%]
  3:          Basic Search       1      848.00       NaN      848      848       0 [0.00%]
  4:           Get Studies       1     2062.00       NaN     2062     2062       0 [0.00%]
  5: Get Study Level Items       1     1220.00       NaN     1220     1220       0 [0.00%]
  6:         Get Countries       1      847.00       NaN      847      847       0 [0.00%]
[ERRORS]
   &amp;lt;&amp;lt; no errors &amp;gt;&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I have a search that should pull out all the Events and put them into a field Events.  However it's only pulling out 2 of the events.  It only shows Login and Full Path as the 2 events extracted.  Here is the search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="ec2_web" "[EVENTS]" | rex field=_raw "\d:\s+(?&amp;lt;event&amp;gt;[\w+\s]+)\s+(?&amp;lt;Status&amp;gt;\d)\s+(?&amp;lt;Avg&amp;gt;\d+.\d+)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;All extractions are working great, except for event.  I talked to 2 different people and they said they thought the regex was fine.  So my last resort is here!  Any idea what could be causing it to only extract 2 events instead of 6?  Also out of the 2 events it extracts, if I click on one of those events and splunk searches for that event, it shows up with 6 spaces after the event name.  For example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="ec2_web" "[EVENTS]" | rex field=_raw "\d:\s+(?&amp;lt;event&amp;gt;[\w+\s]+)\s+(?&amp;lt;Status&amp;gt;\d)\s+(?&amp;lt;Avg&amp;gt;\d+.\d+)" | search event="Login      "
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 28 Jun 2013 16:02:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-not-pulling-out-all-values/m-p/79732#M20171</guid>
      <dc:creator>gnovak</dc:creator>
      <dc:date>2013-06-28T16:02:46Z</dc:date>
    </item>
    <item>
      <title>Re: Regex not pulling out all values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-not-pulling-out-all-values/m-p/79733#M20172</link>
      <description>&lt;P&gt;Is that the text comming in from the log file? Or is that a multiline event?&lt;/P&gt;

&lt;P&gt;The regex is correct and if each line is an event it should return all the lines starting with a number.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jun 2013 16:12:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-not-pulling-out-all-values/m-p/79733#M20172</guid>
      <dc:creator>krugger</dc:creator>
      <dc:date>2013-06-28T16:12:36Z</dc:date>
    </item>
    <item>
      <title>Re: Regex not pulling out all values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-not-pulling-out-all-values/m-p/79734#M20173</link>
      <description>&lt;P&gt;It's one bit chunk just like this in the log&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jun 2013 16:34:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-not-pulling-out-all-values/m-p/79734#M20173</guid>
      <dc:creator>gnovak</dc:creator>
      <dc:date>2013-06-28T16:34:40Z</dc:date>
    </item>
    <item>
      <title>Re: Regex not pulling out all values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-not-pulling-out-all-values/m-p/79735#M20174</link>
      <description>&lt;P&gt;I updated the post to include the full log.  This is classified as one event.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jun 2013 16:38:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-not-pulling-out-all-values/m-p/79735#M20174</guid>
      <dc:creator>gnovak</dc:creator>
      <dc:date>2013-06-28T16:38:22Z</dc:date>
    </item>
    <item>
      <title>Re: Regex not pulling out all values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-not-pulling-out-all-values/m-p/79736#M20175</link>
      <description>&lt;P&gt;SURE this is just one event? By default Splunk should break upon each timestamp, so the "INFO: snapshot" and "INFO: Run complete" should be in two separate events. That's the only way I can think of that you actually would get two instead of one match out of this anyway, because by default &lt;CODE&gt;rex&lt;/CODE&gt; matches only value before quitting and you haven't told it to match more than that.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jun 2013 18:32:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-not-pulling-out-all-values/m-p/79736#M20175</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2013-06-28T18:32:51Z</dc:date>
    </item>
    <item>
      <title>Re: Regex not pulling out all values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-not-pulling-out-all-values/m-p/79737#M20176</link>
      <description>&lt;P&gt;Ok I added max_match=1000 just to test and got more results!  This resolved the issue.  Forgot out this actually...Thanks for refreshing my memory!!!!!&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jun 2013 18:42:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-not-pulling-out-all-values/m-p/79737#M20176</guid>
      <dc:creator>gnovak</dc:creator>
      <dc:date>2013-06-28T18:42:55Z</dc:date>
    </item>
    <item>
      <title>Re: Regex not pulling out all values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-not-pulling-out-all-values/m-p/79738#M20177</link>
      <description>&lt;P&gt;Any idea about getting rid of 6 spaces after the event name?  I'm still messing with that one...could be something i'm just overlooking&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jun 2013 18:49:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-not-pulling-out-all-values/m-p/79738#M20177</guid>
      <dc:creator>gnovak</dc:creator>
      <dc:date>2013-06-28T18:49:35Z</dc:date>
    </item>
    <item>
      <title>Re: Regex not pulling out all values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-not-pulling-out-all-values/m-p/79739#M20178</link>
      <description>&lt;P&gt;Make the match for the event field non-greedy.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;\d:\s+(?&amp;lt;event&amp;gt;[\w+\s]+?)\s+(?&amp;lt;Status&amp;gt;\d)\s+(?&amp;lt;Avg&amp;gt;\d+.\d+)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;(difference is I added the ? sign at the end of the event extraction)&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jun 2013 19:41:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-not-pulling-out-all-values/m-p/79739#M20178</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2013-06-28T19:41:52Z</dc:date>
    </item>
    <item>
      <title>Re: Regex not pulling out all values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-not-pulling-out-all-values/m-p/79740#M20179</link>
      <description>&lt;P&gt;well that did work.  I guess my regex was selfish and greedy.  thanks for the heads up!&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jun 2013 21:36:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-not-pulling-out-all-values/m-p/79740#M20179</guid>
      <dc:creator>gnovak</dc:creator>
      <dc:date>2013-06-28T21:36:21Z</dc:date>
    </item>
  </channel>
</rss>

