<?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 regex delimiters &amp; config file formatting in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/regex-delimiters-config-file-formatting/m-p/41917#M9724</link>
    <description>&lt;P&gt;I'm experiencing a subtle issue, which is not very apparent due to lack of delimiters around regular expressions, where the space after the '=' sign is being parsed as part of the regular expression. Considering most config files use spaces around the '=' sign for readability, this becomes confusing.&lt;/P&gt;

&lt;P&gt;REGEX = info&lt;/P&gt;

&lt;P&gt;This expression would match " info" vs "info". I.e. "abc info" would match, and "abcinfo" would not.&lt;/P&gt;

&lt;P&gt;Is this expected behavior?&lt;/P&gt;</description>
    <pubDate>Thu, 10 Feb 2011 05:40:01 GMT</pubDate>
    <dc:creator>Gregory_Lapchen</dc:creator>
    <dc:date>2011-02-10T05:40:01Z</dc:date>
    <item>
      <title>regex delimiters &amp; config file formatting</title>
      <link>https://community.splunk.com/t5/Splunk-Search/regex-delimiters-config-file-formatting/m-p/41917#M9724</link>
      <description>&lt;P&gt;I'm experiencing a subtle issue, which is not very apparent due to lack of delimiters around regular expressions, where the space after the '=' sign is being parsed as part of the regular expression. Considering most config files use spaces around the '=' sign for readability, this becomes confusing.&lt;/P&gt;

&lt;P&gt;REGEX = info&lt;/P&gt;

&lt;P&gt;This expression would match " info" vs "info". I.e. "abc info" would match, and "abcinfo" would not.&lt;/P&gt;

&lt;P&gt;Is this expected behavior?&lt;/P&gt;</description>
      <pubDate>Thu, 10 Feb 2011 05:40:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/regex-delimiters-config-file-formatting/m-p/41917#M9724</guid>
      <dc:creator>Gregory_Lapchen</dc:creator>
      <dc:date>2011-02-10T05:40:01Z</dc:date>
    </item>
    <item>
      <title>Re: regex delimiters &amp; config file formatting</title>
      <link>https://community.splunk.com/t5/Splunk-Search/regex-delimiters-config-file-formatting/m-p/41918#M9725</link>
      <description>&lt;P&gt;You can either use &lt;CODE&gt;\s&lt;/CODE&gt; (which would match either a space or a tab) or &lt;CODE&gt;[ ]&lt;/CODE&gt; (just the space) in a regex to represent a space, and it's usually a good idea to do so if you've got it at the beginning of a regex. I wonder if you might prefer to use &lt;CODE&gt;\b&lt;/CODE&gt; (word boundary) before the info as well.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Feb 2011 07:15:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/regex-delimiters-config-file-formatting/m-p/41918#M9725</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2011-02-10T07:15:03Z</dc:date>
    </item>
    <item>
      <title>Re: regex delimiters &amp; config file formatting</title>
      <link>https://community.splunk.com/t5/Splunk-Search/regex-delimiters-config-file-formatting/m-p/41919#M9726</link>
      <description>&lt;P&gt;Below Regex will work as expected for you:&lt;BR /&gt;
REGEX=\s+info&lt;/P&gt;</description>
      <pubDate>Fri, 26 Apr 2019 07:13:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/regex-delimiters-config-file-formatting/m-p/41919#M9726</guid>
      <dc:creator>Boopalan</dc:creator>
      <dc:date>2019-04-26T07:13:47Z</dc:date>
    </item>
    <item>
      <title>Re: regex delimiters &amp; config file formatting</title>
      <link>https://community.splunk.com/t5/Splunk-Search/regex-delimiters-config-file-formatting/m-p/41920#M9727</link>
      <description>&lt;P&gt;Hi, @Gregory Lapchenko:&lt;/P&gt;

&lt;P&gt;I'll use &lt;CODE&gt;_&lt;/CODE&gt; in this answer to recognize space.&lt;BR /&gt;
I feel sorry about that I'm not very clearly to understand your puzzle.  From what I understand, are you want to match just &lt;CODE&gt;_info&lt;/CODE&gt; but not &lt;CODE&gt;abc_info&lt;/CODE&gt;? If so, maybe the regex expression is &lt;CODE&gt;\s+info&lt;/CODE&gt; to match &lt;CODE&gt;_info&lt;/CODE&gt;, or &lt;CODE&gt;[^\s]*?\sinfo&lt;/CODE&gt; to match &lt;CODE&gt;abc_info&lt;/CODE&gt;.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Apr 2019 08:34:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/regex-delimiters-config-file-formatting/m-p/41920#M9727</guid>
      <dc:creator>aojie654</dc:creator>
      <dc:date>2019-04-26T08:34:58Z</dc:date>
    </item>
  </channel>
</rss>

