<?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: conditional rex in splunk in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/conditional-rex-in-splunk/m-p/383776#M112089</link>
    <description>&lt;P&gt;Not entirely sure why you would want to do this with a regex, but this should work I think:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| inputlookup Numbers.csv | regex Number="(10[1-9]|1[1-9][0-9]|[2-9][0-9][0-9]|\d{4,})"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This covers all 4 cases: 101-109,110-199,200-999,1000-...&lt;/P&gt;

&lt;P&gt;Alternatively, you could do:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| inputlookup Numbers.csv | regex Number="\d{3,}" | regex Number!="100"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;To first get any Number of 3 or more digits and then drop the ones equal to 100.&lt;/P&gt;</description>
    <pubDate>Thu, 14 Jun 2018 14:15:06 GMT</pubDate>
    <dc:creator>FrankVl</dc:creator>
    <dc:date>2018-06-14T14:15:06Z</dc:date>
    <item>
      <title>conditional rex in splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/conditional-rex-in-splunk/m-p/383775#M112088</link>
      <description>&lt;P&gt;I have a field called Number and it has got a value like :&lt;/P&gt;

&lt;P&gt;| inputlookup Numbers.csv &lt;/P&gt;

&lt;P&gt;Number&lt;BR /&gt;
102&lt;BR /&gt;
2&lt;BR /&gt;
45&lt;BR /&gt;
204&lt;BR /&gt;
345&lt;BR /&gt;
100&lt;BR /&gt;
100&lt;BR /&gt;
45&lt;BR /&gt;
21&lt;BR /&gt;
100&lt;BR /&gt;
103&lt;/P&gt;

&lt;P&gt;If I do | inputlookup Numbers.csv | where Number &amp;gt; 100  then I would get only those number which are greater than 100.&lt;/P&gt;

&lt;P&gt;The same thing I wanna achieve using Regular Expression ( REGEX ) to get only those which are greater than 100. It could be 101 , 102, 102...100000000002, 10000000,5000,345,50987,etc. &lt;/P&gt;

&lt;P&gt;I did this "| inputlookup Numbers.csv | regex Number="(1|[2-9])(0|[1-9])(1|[2-9])" but , partially working. Kindly help !!&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jun 2018 14:04:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/conditional-rex-in-splunk/m-p/383775#M112088</guid>
      <dc:creator>abhayneilam</dc:creator>
      <dc:date>2018-06-14T14:04:00Z</dc:date>
    </item>
    <item>
      <title>Re: conditional rex in splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/conditional-rex-in-splunk/m-p/383776#M112089</link>
      <description>&lt;P&gt;Not entirely sure why you would want to do this with a regex, but this should work I think:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| inputlookup Numbers.csv | regex Number="(10[1-9]|1[1-9][0-9]|[2-9][0-9][0-9]|\d{4,})"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This covers all 4 cases: 101-109,110-199,200-999,1000-...&lt;/P&gt;

&lt;P&gt;Alternatively, you could do:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| inputlookup Numbers.csv | regex Number="\d{3,}" | regex Number!="100"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;To first get any Number of 3 or more digits and then drop the ones equal to 100.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jun 2018 14:15:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/conditional-rex-in-splunk/m-p/383776#M112089</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2018-06-14T14:15:06Z</dc:date>
    </item>
    <item>
      <title>Re: conditional rex in splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/conditional-rex-in-splunk/m-p/383777#M112090</link>
      <description>&lt;P&gt;Thanks !!!!&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jun 2018 14:56:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/conditional-rex-in-splunk/m-p/383777#M112090</guid>
      <dc:creator>abhayneilam</dc:creator>
      <dc:date>2018-06-14T14:56:15Z</dc:date>
    </item>
  </channel>
</rss>

