<?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: Efficiency of REGEX = . vs REGEX = .* vs REGEX = (.*) in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Efficiency-of-REGEX-vs-REGEX-vs-REGEX/m-p/460174#M129815</link>
    <description>&lt;P&gt;In hindsight, I should have said that the value of _raw was irrelevant as the decision to not index the event was being made on the basis of either the host, source or sourcetype.  So the transforms stanza was really just about setting the queue to nullQueue.&lt;/P&gt;

&lt;P&gt;And thank you for the link to the Conf presentation.  I had seen it before but it was good to go over it again.&lt;/P&gt;</description>
    <pubDate>Mon, 03 Feb 2020 20:38:16 GMT</pubDate>
    <dc:creator>chris_barrett</dc:creator>
    <dc:date>2020-02-03T20:38:16Z</dc:date>
    <item>
      <title>Efficiency of REGEX = . vs REGEX = .* vs REGEX = (.*)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Efficiency-of-REGEX-vs-REGEX-vs-REGEX/m-p/460170#M129811</link>
      <description>&lt;P&gt;Which of the following (in terms of the REGEX) is the most efficient? I've seen examples of all of them.    And is there an even more efficient REGEX?&lt;/P&gt;

&lt;P&gt;[send_to_nullQueue_dot]&lt;BR /&gt;
SOURCE_KEY = _raw&lt;BR /&gt;
REGEX = .&lt;BR /&gt;
DEST_KEY = queue&lt;BR /&gt;
FORMAT   = nullQueue&lt;/P&gt;

&lt;P&gt;[send_to_nullQueue_dot_star]&lt;BR /&gt;
SOURCE_KEY = _raw&lt;BR /&gt;
REGEX = .*&lt;BR /&gt;
DEST_KEY = queue&lt;BR /&gt;
FORMAT   = nullQueue&lt;/P&gt;

&lt;P&gt;[send_to_nullQueue_dot_plus]&lt;BR /&gt;
SOURCE_KEY = _raw&lt;BR /&gt;
REGEX = .+&lt;BR /&gt;
DEST_KEY = queue&lt;BR /&gt;
FORMAT   = nullQueue&lt;/P&gt;

&lt;P&gt;[send_to_nullQueue_dot_star_lazy]&lt;BR /&gt;
SOURCE_KEY = _raw&lt;BR /&gt;
REGEX = .*?&lt;BR /&gt;
DEST_KEY = queue&lt;BR /&gt;
FORMAT   = nullQueue&lt;/P&gt;

&lt;P&gt;[send_to_nullQueue_captured_dot_star]&lt;BR /&gt;
SOURCE_KEY = _raw&lt;BR /&gt;
REGEX = (.*)&lt;BR /&gt;
DEST_KEY = queue&lt;BR /&gt;
FORMAT   = nullQueue&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 04:01:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Efficiency-of-REGEX-vs-REGEX-vs-REGEX/m-p/460170#M129811</guid>
      <dc:creator>chris_barrett</dc:creator>
      <dc:date>2020-09-30T04:01:11Z</dc:date>
    </item>
    <item>
      <title>Re: Efficiency of REGEX = . vs REGEX = .* vs REGEX = (.*)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Efficiency-of-REGEX-vs-REGEX-vs-REGEX/m-p/460171#M129812</link>
      <description>&lt;P&gt;Matching is all different.&lt;BR /&gt;
if it works, &lt;CODE&gt;.&lt;/CODE&gt;  is best.&lt;BR /&gt;
but it works?&lt;/P&gt;</description>
      <pubDate>Mon, 03 Feb 2020 10:05:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Efficiency-of-REGEX-vs-REGEX-vs-REGEX/m-p/460171#M129812</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-02-03T10:05:14Z</dc:date>
    </item>
    <item>
      <title>Re: Efficiency of REGEX = . vs REGEX = .* vs REGEX = (.*)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Efficiency-of-REGEX-vs-REGEX-vs-REGEX/m-p/460172#M129813</link>
      <description>&lt;P&gt;Most efficient in regard of speed? You can test your regexes with &lt;A href="https://regex101.com/"&gt;https://regex101.com/&lt;/A&gt; and compare "number of steps" shown right on top of the regex field.&lt;/P&gt;

&lt;P&gt;REGEX = . doesn't make sense because it matches any pattern.&lt;/P&gt;

&lt;P&gt;My bet: fixed case-sensitive pattern with static quanitifiers anchored to beginning of the line? &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;There are a lot of information about regexes on World Wide Web, hier is splunk focused: &lt;A href="https://conf.splunk.com/files/2016/slides/become-a-regular-expressions-ninja-and-unlock-your-splunk-potential.pdf"&gt;https://conf.splunk.com/files/2016/slides/become-a-regular-expressions-ninja-and-unlock-your-splunk-potential.pdf&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Feb 2020 10:54:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Efficiency-of-REGEX-vs-REGEX-vs-REGEX/m-p/460172#M129813</guid>
      <dc:creator>PavelP</dc:creator>
      <dc:date>2020-02-03T10:54:08Z</dc:date>
    </item>
    <item>
      <title>Re: Efficiency of REGEX = . vs REGEX = .* vs REGEX = (.*)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Efficiency-of-REGEX-vs-REGEX-vs-REGEX/m-p/460173#M129814</link>
      <description>&lt;P&gt;A single dot matches any single character that is in the input line.  That's the fastest, most effective one.  &lt;/P&gt;

&lt;P&gt;All the other ones are more complicated than that, so would be slightly slower.&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;.&lt;/CODE&gt; any single character&lt;BR /&gt;
&lt;CODE&gt;.*&lt;/CODE&gt; zero or more characters but scan all of them&lt;BR /&gt;
&lt;CODE&gt;.+&lt;/CODE&gt; one or more characters but scan all of them&lt;BR /&gt;
&lt;CODE&gt;.+?&lt;/CODE&gt; zero or more characters, scan up to all of them but be wishy washy about it &lt;BR /&gt;
&lt;CODE&gt;(.*)&lt;/CODE&gt; zero or more characters, scan all of them, but collect the whole thing as a field and then do nothing with it.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Feb 2020 17:27:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Efficiency-of-REGEX-vs-REGEX-vs-REGEX/m-p/460173#M129814</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2020-02-03T17:27:45Z</dc:date>
    </item>
    <item>
      <title>Re: Efficiency of REGEX = . vs REGEX = .* vs REGEX = (.*)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Efficiency-of-REGEX-vs-REGEX-vs-REGEX/m-p/460174#M129815</link>
      <description>&lt;P&gt;In hindsight, I should have said that the value of _raw was irrelevant as the decision to not index the event was being made on the basis of either the host, source or sourcetype.  So the transforms stanza was really just about setting the queue to nullQueue.&lt;/P&gt;

&lt;P&gt;And thank you for the link to the Conf presentation.  I had seen it before but it was good to go over it again.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Feb 2020 20:38:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Efficiency-of-REGEX-vs-REGEX-vs-REGEX/m-p/460174#M129815</guid>
      <dc:creator>chris_barrett</dc:creator>
      <dc:date>2020-02-03T20:38:16Z</dc:date>
    </item>
  </channel>
</rss>

