<?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: problem with REX in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/problem-with-REX/m-p/104365#M27025</link>
    <description>&lt;P&gt;hi abhayneilam&lt;/P&gt;

&lt;P&gt;take your _raw data, paste them into &lt;A href="http://gskinner.com/RegExr/"&gt;http://gskinner.com/RegExr/&lt;/A&gt; and test your regex until it matches. gskinner's RegExr is just perfect to test regex for splunk.&lt;/P&gt;

&lt;P&gt;cheers,&lt;/P&gt;

&lt;P&gt;MuS&lt;/P&gt;</description>
    <pubDate>Fri, 26 Oct 2012 19:47:45 GMT</pubDate>
    <dc:creator>MuS</dc:creator>
    <dc:date>2012-10-26T19:47:45Z</dc:date>
    <item>
      <title>problem with REX</title>
      <link>https://community.splunk.com/t5/Splunk-Search/problem-with-REX/m-p/104364#M27024</link>
      <description>&lt;P&gt;I am giving the following search :&lt;/P&gt;

&lt;P&gt;index="maa" | table Name Age Location | rex field="Location" (?&lt;ONE&gt;(?i)"delhi") | eval ONE=lower(ONE) |stats count(ONE) by ONE &lt;/ONE&gt;&lt;/P&gt;

&lt;P&gt;and it is giving me :&lt;/P&gt;

&lt;P&gt;delhi    5     ( because delhi is coming five times ) &lt;/P&gt;

&lt;P&gt;but when I am running with multiple keywords :&lt;/P&gt;

&lt;P&gt;index="maa" | table Name Age Location | rex field="Location" (?&lt;ONE&gt;(?i)"delhi|kol") | eval ONE=lower(ONE) |stats count(ONE) by ONE &lt;/ONE&gt;&lt;/P&gt;

&lt;P&gt;it is giving me some diffent count for delhi&lt;/P&gt;

&lt;P&gt;delhi    4&lt;BR /&gt;
kol      2&lt;/P&gt;

&lt;P&gt;I am not getting the correct count when i am using it for more than one keyword. please help otherwise I have to write "rex" 20 times for 20 keywords&lt;/P&gt;

&lt;P&gt;Please help&lt;/P&gt;

&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
      <pubDate>Fri, 26 Oct 2012 19:18:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/problem-with-REX/m-p/104364#M27024</guid>
      <dc:creator>abhayneilam</dc:creator>
      <dc:date>2012-10-26T19:18:34Z</dc:date>
    </item>
    <item>
      <title>Re: problem with REX</title>
      <link>https://community.splunk.com/t5/Splunk-Search/problem-with-REX/m-p/104365#M27025</link>
      <description>&lt;P&gt;hi abhayneilam&lt;/P&gt;

&lt;P&gt;take your _raw data, paste them into &lt;A href="http://gskinner.com/RegExr/"&gt;http://gskinner.com/RegExr/&lt;/A&gt; and test your regex until it matches. gskinner's RegExr is just perfect to test regex for splunk.&lt;/P&gt;

&lt;P&gt;cheers,&lt;/P&gt;

&lt;P&gt;MuS&lt;/P&gt;</description>
      <pubDate>Fri, 26 Oct 2012 19:47:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/problem-with-REX/m-p/104365#M27025</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2012-10-26T19:47:45Z</dc:date>
    </item>
    <item>
      <title>Re: problem with REX</title>
      <link>https://community.splunk.com/t5/Splunk-Search/problem-with-REX/m-p/104366#M27026</link>
      <description>&lt;P&gt;But my question was something different, I am asking for the correct count as shown above..please help me out with this problem...&lt;/P&gt;

&lt;P&gt;Please help me ..&lt;/P&gt;

&lt;P&gt;Thanks in Advance !!&lt;/P&gt;</description>
      <pubDate>Fri, 26 Oct 2012 20:26:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/problem-with-REX/m-p/104366#M27026</guid>
      <dc:creator>abhayneilam</dc:creator>
      <dc:date>2012-10-26T20:26:45Z</dc:date>
    </item>
    <item>
      <title>Re: problem with REX</title>
      <link>https://community.splunk.com/t5/Splunk-Search/problem-with-REX/m-p/104367#M27027</link>
      <description>&lt;P&gt;exactly, that's why you have to use your raw data and test your regex. I cannot do magic and provide any solution without the raw data.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Oct 2012 20:33:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/problem-with-REX/m-p/104367#M27027</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2012-10-26T20:33:56Z</dc:date>
    </item>
    <item>
      <title>Re: problem with REX</title>
      <link>https://community.splunk.com/t5/Splunk-Search/problem-with-REX/m-p/104368#M27028</link>
      <description>&lt;P&gt;abhay|26|koldelhigmumbaiis_delhiood_di&lt;BR /&gt;
murari|30|ranigang&lt;BR /&gt;
abc|32|mumbai is delhi place&lt;BR /&gt;
murari|30|ranigang_kolbabbu is kol&lt;BR /&gt;
murari|30|delHI is not in kolkata&lt;BR /&gt;
mno|100|delhi&lt;BR /&gt;
murari|30|ranig&lt;BR /&gt;
xyz|100|delhi&lt;/P&gt;

&lt;P&gt;this is my raw data.. delhi is coming 5 times but in the search it is coming 4 times , and kol is coming  3 times but in the search it is coming 2 times ..&lt;/P&gt;

&lt;P&gt;Now , I thing you can provide some solutions on that&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 12:42:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/problem-with-REX/m-p/104368#M27028</guid>
      <dc:creator>abhayneilam</dc:creator>
      <dc:date>2020-09-28T12:42:14Z</dc:date>
    </item>
    <item>
      <title>Re: problem with REX</title>
      <link>https://community.splunk.com/t5/Splunk-Search/problem-with-REX/m-p/104369#M27029</link>
      <description>&lt;P&gt;delhi is matching 6 times &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Oct 2012 20:42:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/problem-with-REX/m-p/104369#M27029</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2012-10-26T20:42:40Z</dc:date>
    </item>
    <item>
      <title>Re: problem with REX</title>
      <link>https://community.splunk.com/t5/Splunk-Search/problem-with-REX/m-p/104370#M27030</link>
      <description>&lt;P&gt;no honestly as I've written use gskinner RegExr it helps a lot. Probably you have some miss understanding of your raw data and the regex because kol is 4 times in the raw data and not only 3 times.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Oct 2012 20:47:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/problem-with-REX/m-p/104370#M27030</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2012-10-26T20:47:13Z</dc:date>
    </item>
    <item>
      <title>Re: problem with REX</title>
      <link>https://community.splunk.com/t5/Splunk-Search/problem-with-REX/m-p/104371#M27031</link>
      <description>&lt;P&gt;One per line, so it counts 5 :). please help me to solve this one&lt;/P&gt;</description>
      <pubDate>Fri, 26 Oct 2012 20:48:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/problem-with-REX/m-p/104371#M27031</guid>
      <dc:creator>abhayneilam</dc:creator>
      <dc:date>2012-10-26T20:48:28Z</dc:date>
    </item>
    <item>
      <title>Re: problem with REX</title>
      <link>https://community.splunk.com/t5/Splunk-Search/problem-with-REX/m-p/104372#M27032</link>
      <description>&lt;P&gt;One pattern per line, kol is 3 times and delhi is 5 times..&lt;/P&gt;

&lt;P&gt;Now please help&lt;/P&gt;</description>
      <pubDate>Fri, 26 Oct 2012 20:54:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/problem-with-REX/m-p/104372#M27032</guid>
      <dc:creator>abhayneilam</dc:creator>
      <dc:date>2012-10-26T20:54:33Z</dc:date>
    </item>
    <item>
      <title>Re: problem with REX</title>
      <link>https://community.splunk.com/t5/Splunk-Search/problem-with-REX/m-p/104373#M27033</link>
      <description>&lt;P&gt;with your regex this will not work, neither with mine. for example the first line matches both kol and delhi. Then you have delHi, that does not match delhi - it would match delHi. this will be very tricky to match your expatiation, data and regex.&lt;/P&gt;

&lt;P&gt;give me some time.....&lt;/P&gt;</description>
      <pubDate>Fri, 26 Oct 2012 21:10:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/problem-with-REX/m-p/104373#M27033</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2012-10-26T21:10:21Z</dc:date>
    </item>
    <item>
      <title>Re: problem with REX</title>
      <link>https://community.splunk.com/t5/Splunk-Search/problem-with-REX/m-p/104374#M27034</link>
      <description>&lt;P&gt;the problem is, that in the data multiple city occur at the same line. you want to match only ONE city per line, either delhi, kol or mumbai.&lt;BR /&gt;
I cannot create any regex matching this pattern on gskinner....sorry but on the other hand I'm no regex expert after all &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Oct 2012 07:22:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/problem-with-REX/m-p/104374#M27034</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2012-10-29T07:22:59Z</dc:date>
    </item>
  </channel>
</rss>

