<?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 meaning? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/REGEX-meaning/m-p/208606#M60891</link>
    <description>&lt;P&gt;Within square brackets the '^' character means 'not'.  Therefore, the regex matches at least one non-slash character followed by a slash.&lt;/P&gt;</description>
    <pubDate>Thu, 03 Nov 2016 11:57:19 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2016-11-03T11:57:19Z</dc:date>
    <item>
      <title>([^\/]+)\/  REGEX meaning?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/REGEX-meaning/m-p/208605#M60890</link>
      <description>&lt;P&gt;Can someone explain me wht that simple regex means??&lt;BR /&gt;
Sorry for this simple question but this is very new to me. I understand these..&lt;BR /&gt;
^ --&amp;gt; refers to start of / position&lt;BR /&gt;
+--&amp;gt; means one or more&lt;BR /&gt;
([^\/]+)\/&lt;/P&gt;

&lt;P&gt;But this regex matches the below CAPITAL ONES for example:&lt;/P&gt;

&lt;P&gt;AAAA/BBBB/CCCC/hhhh&lt;BR /&gt;
Why hhhh is not matched? If ^\/ refers to start of position of "/", why things before the last slash ie before /hhhh are matched??&lt;/P&gt;

&lt;P&gt;Appreciate your help on this.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Nov 2016 10:51:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/REGEX-meaning/m-p/208605#M60890</guid>
      <dc:creator>Harishma</dc:creator>
      <dc:date>2016-11-03T10:51:44Z</dc:date>
    </item>
    <item>
      <title>Re: ([^\/]+)\/  REGEX meaning?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/REGEX-meaning/m-p/208606#M60891</link>
      <description>&lt;P&gt;Within square brackets the '^' character means 'not'.  Therefore, the regex matches at least one non-slash character followed by a slash.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Nov 2016 11:57:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/REGEX-meaning/m-p/208606#M60891</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2016-11-03T11:57:19Z</dc:date>
    </item>
    <item>
      <title>Re: ([^\/]+)\/  REGEX meaning?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/REGEX-meaning/m-p/208607#M60892</link>
      <description>&lt;P&gt;Oh If thats the case , it should ignore AAAA and match /BBBB/CCCC/hhhh&lt;/P&gt;

&lt;P&gt;(\/.+) would match like that right??&lt;/P&gt;

&lt;P&gt;Whats the difference between this (\/.+) and ([^\/]+)\/&lt;/P&gt;</description>
      <pubDate>Thu, 03 Nov 2016 14:20:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/REGEX-meaning/m-p/208607#M60892</guid>
      <dc:creator>Harishma</dc:creator>
      <dc:date>2016-11-03T14:20:32Z</dc:date>
    </item>
    <item>
      <title>Re: ([^\/]+)\/  REGEX meaning?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/REGEX-meaning/m-p/208608#M60893</link>
      <description>&lt;P&gt;You can see a lot of this at what I've saved on &lt;A href="https://regex101.com/r/dl3wep/1"&gt;regex101.com&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Bit by bit, &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;(\/.+)&lt;/CODE&gt;&lt;BR /&gt;
&lt;CODE&gt;\/&lt;/CODE&gt; is an escape, forward slash.  The escape says the forward slash isn't a control character, but that you instead actually want a literal forward slash.  &lt;CODE&gt;.&lt;/CODE&gt; matches any one character, and the following &lt;CODE&gt;+&lt;/CODE&gt; says "One or more of whatever immediately preceded this".  So, all together, it'll look for a forward slash then one or more "somethings" following it. &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;([^\/]+)\/&lt;/CODE&gt;&lt;BR /&gt;
&lt;CODE&gt;[^\/]&lt;/CODE&gt; says to match characters that are NOT a forward slash.  &lt;CODE&gt;[]&lt;/CODE&gt; is for a character set, but when the first character inside it is &lt;CODE&gt;^&lt;/CODE&gt; it flips it to NOT that character set.  Following that is &lt;CODE&gt;+&lt;/CODE&gt; so take one or more of those.  Finally, the trailing &lt;CODE&gt;\/&lt;/CODE&gt; says it should be followed by a forward slash.&lt;/P&gt;

&lt;P&gt;Again the regex101 link above has this, and if you study the explanation on the left it should vaguely match what I just wrote.  &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Also note the parenthesis are just to group things.  &lt;/P&gt;</description>
      <pubDate>Thu, 03 Nov 2016 15:16:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/REGEX-meaning/m-p/208608#M60893</guid>
      <dc:creator>Richfez</dc:creator>
      <dc:date>2016-11-03T15:16:54Z</dc:date>
    </item>
    <item>
      <title>Re: ([^\/]+)\/  REGEX meaning?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/REGEX-meaning/m-p/208609#M60894</link>
      <description>&lt;P&gt;&lt;CODE&gt;\/&lt;/CODE&gt; ------- will match for a "/"&lt;BR /&gt;
&lt;CODE&gt;^\/&lt;/CODE&gt; ----- will match for a "/" at the beginning of the line.&lt;BR /&gt;
&lt;CODE&gt;[^\/]&lt;/CODE&gt;  ------ ^ inside a [ ] will be for negation(opposite of). it will match for anything except a "/"&lt;BR /&gt;
&lt;CODE&gt;[^\/]+&lt;/CODE&gt; ----- it will match for, one or more characters, anything except a "/"&lt;BR /&gt;
&lt;CODE&gt;([^\/]+)&lt;/CODE&gt;----- the rex matching should be put inside the flower bracket "( )".&lt;BR /&gt;
&lt;CODE&gt;([^\/]+)\/&lt;/CODE&gt; --- the "\/" tells that, match till this "/".  (it will match only AAAA or whatever before a first "/".)&lt;/P&gt;</description>
      <pubDate>Thu, 03 Nov 2016 15:30:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/REGEX-meaning/m-p/208609#M60894</guid>
      <dc:creator>inventsekar</dc:creator>
      <dc:date>2016-11-03T15:30:53Z</dc:date>
    </item>
    <item>
      <title>Re: ([^\/]+)\/  REGEX meaning?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/REGEX-meaning/m-p/208610#M60895</link>
      <description>&lt;P&gt;Thankyuo so much &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; That helped..!!&lt;/P&gt;</description>
      <pubDate>Fri, 04 Nov 2016 07:09:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/REGEX-meaning/m-p/208610#M60895</guid>
      <dc:creator>Harishma</dc:creator>
      <dc:date>2016-11-04T07:09:53Z</dc:date>
    </item>
    <item>
      <title>Re: ([^\/]+)\/  REGEX meaning?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/REGEX-meaning/m-p/208611#M60896</link>
      <description>&lt;P&gt;Thankyuo so much &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; Got it ..&lt;/P&gt;</description>
      <pubDate>Fri, 04 Nov 2016 07:11:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/REGEX-meaning/m-p/208611#M60896</guid>
      <dc:creator>Harishma</dc:creator>
      <dc:date>2016-11-04T07:11:06Z</dc:date>
    </item>
    <item>
      <title>Re: ([^\/]+)\/  REGEX meaning?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/REGEX-meaning/m-p/208612#M60897</link>
      <description>&lt;P&gt;I think you do not need to escape the &lt;CODE&gt;/&lt;/CODE&gt; inside &lt;CODE&gt;[]&lt;/CODE&gt;, so this will work as well.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;([^/]+)\/
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 04 Nov 2016 08:14:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/REGEX-meaning/m-p/208612#M60897</guid>
      <dc:creator>lakromani</dc:creator>
      <dc:date>2016-11-04T08:14:11Z</dc:date>
    </item>
  </channel>
</rss>

