<?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 Lexicographic comparison of version strings? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Lexicographic-comparison-of-version-strings/m-p/26420#M5093</link>
    <description>&lt;P&gt;I have version strings in my log output, and I'd like to filter on these, like&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| where version &amp;lt; 2.3.5
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But Splunk only wants to do numeric comparison with '&amp;lt;'.  Is there an operator to perform lexicographic comparisons?&lt;/P&gt;</description>
    <pubDate>Tue, 06 Aug 2013 17:50:08 GMT</pubDate>
    <dc:creator>waisbrot</dc:creator>
    <dc:date>2013-08-06T17:50:08Z</dc:date>
    <item>
      <title>Lexicographic comparison of version strings?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Lexicographic-comparison-of-version-strings/m-p/26420#M5093</link>
      <description>&lt;P&gt;I have version strings in my log output, and I'd like to filter on these, like&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| where version &amp;lt; 2.3.5
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But Splunk only wants to do numeric comparison with '&amp;lt;'.  Is there an operator to perform lexicographic comparisons?&lt;/P&gt;</description>
      <pubDate>Tue, 06 Aug 2013 17:50:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Lexicographic-comparison-of-version-strings/m-p/26420#M5093</guid>
      <dc:creator>waisbrot</dc:creator>
      <dc:date>2013-08-06T17:50:08Z</dc:date>
    </item>
    <item>
      <title>Re: Lexicographic comparison of version strings?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Lexicographic-comparison-of-version-strings/m-p/26421#M5094</link>
      <description>&lt;P&gt;I am not aware of a function or command to do this.  &lt;/P&gt;

&lt;P&gt;However, you could use a more complicated where clause if we assume you have broken out the version into fields major, minor and point....&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|where major &amp;gt; 2 OR (major &amp;gt;=2 AND minor &amp;gt;3) OR (major &amp;gt;=2 AND minor &amp;gt;= 2 AND point &amp;gt; 5)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 28 May 2014 02:36:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Lexicographic-comparison-of-version-strings/m-p/26421#M5094</guid>
      <dc:creator>okrabbe_splunk</dc:creator>
      <dc:date>2014-05-28T02:36:51Z</dc:date>
    </item>
  </channel>
</rss>

