<?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: regex query in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Help-with-regex-search/m-p/620894#M215830</link>
    <description>&lt;P&gt;There are a couple of things you might want to change - you could use the max_match option to limit the number of matches, you could use the carat (^) to anchor the match to the beginning of the field, you could use \w instead of the double negative (^ in the square brackets means not, \W means not \w, so ^\W should be equivalent to \w)&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex max_match=1 "(?&amp;lt;SITE_NAME&amp;gt;^\w{3})"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 15 Nov 2022 13:30:14 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2022-11-15T13:30:14Z</dc:date>
    <item>
      <title>Help with regex search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-regex-search/m-p/620868#M215816</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;
&lt;P&gt;Thanks in advance,&lt;/P&gt;
&lt;P&gt;Need a quick help in Regex query,&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Input values:&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;KUL6LJBJ62YD&lt;BR /&gt;BLR6LC7BLNJR&lt;BR /&gt;HRI6M5G6KKPH&lt;BR /&gt;KUL6LJ3N0F6J&lt;BR /&gt;HRI6LBJKRHHR&lt;BR /&gt;HRI6LB65G6NF&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Expected output:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;First 3 character of each phrase.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;CUrrent Regex :&amp;nbsp;(?&amp;lt;SITE_NAME&amp;gt;[^\W]{3})&amp;nbsp; &amp;nbsp; &amp;lt;&amp;lt; BUT AM not getting proper output&amp;gt;&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Expected Output :&lt;/P&gt;
&lt;P&gt;| table&amp;nbsp;SITE_NAME&lt;/P&gt;
&lt;P&gt;KUL&lt;/P&gt;
&lt;P&gt;BLR&lt;/P&gt;
&lt;P&gt;HRI&lt;/P&gt;
&lt;P&gt;KUL&lt;BR /&gt;HRI&lt;/P&gt;
&lt;P&gt;HRI&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;Jerin V&lt;/P&gt;</description>
      <pubDate>Tue, 15 Nov 2022 13:55:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-regex-search/m-p/620868#M215816</guid>
      <dc:creator>jerinvarghese</dc:creator>
      <dc:date>2022-11-15T13:55:21Z</dc:date>
    </item>
    <item>
      <title>Re: regex query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-regex-search/m-p/620871#M215819</link>
      <description>&lt;P&gt;Your output is exactly the first 3 characters of each input. &amp;nbsp;What is the question then?&lt;/P&gt;</description>
      <pubDate>Tue, 15 Nov 2022 10:50:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-regex-search/m-p/620871#M215819</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2022-11-15T10:50:09Z</dc:date>
    </item>
    <item>
      <title>Re: regex query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-regex-search/m-p/620872#M215820</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/33379"&gt;@jerinvarghese&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;your regex is correct and you could also use substr:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval SITE_NAME=substr(SITE_NAME,3)&lt;/LI-CODE&gt;&lt;P&gt;so what is your issue?&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 15 Nov 2022 10:58:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-regex-search/m-p/620872#M215820</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-11-15T10:58:54Z</dc:date>
    </item>
    <item>
      <title>Re: regex query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-regex-search/m-p/620884#M215825</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="splunk query.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/22495iA544E6F931433A48/image-size/medium?v=v2&amp;amp;px=400" role="button" title="splunk query.png" alt="splunk query.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; In my search in SPlunk, It sometimes shows me the second vlaue(dark green), thats where i got the problem.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Nov 2022 12:02:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-regex-search/m-p/620884#M215825</guid>
      <dc:creator>jerinvarghese</dc:creator>
      <dc:date>2022-11-15T12:02:29Z</dc:date>
    </item>
    <item>
      <title>Re: regex query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-regex-search/m-p/620891#M215828</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/33379"&gt;@jerinvarghese&lt;/a&gt;, I don't know if your input can contain only number and letters or also other symbols; in case of alphabet letter and arabic number only, I tested this on regex101:&amp;nbsp;&lt;A href="https://regex101.com/r/sXAp7g/1" target="_self"&gt;Regex3chars&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please let me know if it works or Splunk or not.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Nov 2022 13:25:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-regex-search/m-p/620891#M215828</guid>
      <dc:creator>SplunkExplorer</dc:creator>
      <dc:date>2022-11-15T13:25:37Z</dc:date>
    </item>
    <item>
      <title>Re: regex query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-regex-search/m-p/620894#M215830</link>
      <description>&lt;P&gt;There are a couple of things you might want to change - you could use the max_match option to limit the number of matches, you could use the carat (^) to anchor the match to the beginning of the field, you could use \w instead of the double negative (^ in the square brackets means not, \W means not \w, so ^\W should be equivalent to \w)&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex max_match=1 "(?&amp;lt;SITE_NAME&amp;gt;^\w{3})"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Nov 2022 13:30:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-regex-search/m-p/620894#M215830</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-11-15T13:30:14Z</dc:date>
    </item>
  </channel>
</rss>

