<?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: What is the meaning of my regular expression? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-meaning-of-my-regular-expression/m-p/286302#M86686</link>
    <description>&lt;P&gt;Thanks Joshua and sundareshr.&lt;/P&gt;

&lt;P&gt;Can you please tell me a few resources to learn regex?&lt;/P&gt;</description>
    <pubDate>Mon, 19 Sep 2016 16:12:10 GMT</pubDate>
    <dc:creator>namritha</dc:creator>
    <dc:date>2016-09-19T16:12:10Z</dc:date>
    <item>
      <title>What is the meaning of my regular expression?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-meaning-of-my-regular-expression/m-p/286299#M86683</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I used splunk to extract a new field and it has used this regular expression, &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;rex "^(?:[^\|\n]*\|){6}(?P&amp;lt;errorValue&amp;gt;.*)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I have figured out that this checks for 6 occurrences of | and extracts the rest of the line.&lt;/P&gt;

&lt;P&gt;What does &lt;CODE&gt;^(?:[^\|\n]*&lt;/CODE&gt; mean?&lt;/P&gt;

&lt;P&gt;Also, what does &lt;CODE&gt;.*&lt;/CODE&gt; at the end of &lt;CODE&gt;(?P&amp;lt;errorValue&amp;gt;.*)&lt;/CODE&gt; mean?&lt;/P&gt;

&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2016 20:12:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-meaning-of-my-regular-expression/m-p/286299#M86683</guid>
      <dc:creator>namritha</dc:creator>
      <dc:date>2016-09-16T20:12:06Z</dc:date>
    </item>
    <item>
      <title>Re: What is the meaning of my regular expression?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-meaning-of-my-regular-expression/m-p/286300#M86684</link>
      <description>&lt;P&gt;I pasted your regex here &lt;A href="http://www.regex101.com"&gt;http://www.regex101.com&lt;/A&gt; and this is what I got back&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;^(?:[^\|\n]*\|){6}(?P&amp;lt;errorValue&amp;gt;.*)
^ represents start of the string 
(?:[^\|\n]*\|){6} Non-capturing group
Quantifier: {6} Exactly 6 times
[^\|\n]* match a single character not present in the list below
Quantifier: * Between zero and unlimited times, as many times as possible, giving back as needed [greedy]
\| matches the character | literally
\n matches a line-feed (newline) character (ASCII 10)
\| matches the character | literally

(?P&amp;lt;errorValue&amp;gt;.*) Named capturing group errorValue
.* matches any character (except newline)
Quantifier: * Between zero and unlimited times, as many times as possible, giving back as needed [greedy]
MATCH INFORMATION
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 16 Sep 2016 20:20:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-meaning-of-my-regular-expression/m-p/286300#M86684</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-09-16T20:20:11Z</dc:date>
    </item>
    <item>
      <title>Re: What is the meaning of my regular expression?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-meaning-of-my-regular-expression/m-p/286301#M86685</link>
      <description>&lt;P&gt;I believe the first part is looking for the first instance(^)  in your string but it is a non-capture group so it looks for all of it but doesn't put it into your variable (Looks for the 6 occurences of the |, but doesn't save it) (?:[^|] \n is line-feed new line.&lt;/P&gt;

&lt;P&gt;.* = Matches anything until the end of the string&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2016 20:28:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-meaning-of-my-regular-expression/m-p/286301#M86685</guid>
      <dc:creator>JoshuaJohn</dc:creator>
      <dc:date>2016-09-16T20:28:17Z</dc:date>
    </item>
    <item>
      <title>Re: What is the meaning of my regular expression?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-meaning-of-my-regular-expression/m-p/286302#M86686</link>
      <description>&lt;P&gt;Thanks Joshua and sundareshr.&lt;/P&gt;

&lt;P&gt;Can you please tell me a few resources to learn regex?&lt;/P&gt;</description>
      <pubDate>Mon, 19 Sep 2016 16:12:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-meaning-of-my-regular-expression/m-p/286302#M86686</guid>
      <dc:creator>namritha</dc:creator>
      <dc:date>2016-09-19T16:12:10Z</dc:date>
    </item>
    <item>
      <title>Re: What is the meaning of my regular expression?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-meaning-of-my-regular-expression/m-p/286303#M86687</link>
      <description>&lt;P&gt;I feel regex is an example based language there isn't a ton to learn in terms of the actual language but have a quick reference sheet like on a site like regex101.com or regexr.com&lt;/P&gt;

&lt;P&gt;Then just takes log files from your splunk queries and try to create regex searches on those sites to grab specific information you want to take &lt;/P&gt;</description>
      <pubDate>Mon, 19 Sep 2016 16:16:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-meaning-of-my-regular-expression/m-p/286303#M86687</guid>
      <dc:creator>JoshuaJohn</dc:creator>
      <dc:date>2016-09-19T16:16:50Z</dc:date>
    </item>
    <item>
      <title>Re: What is the meaning of my regular expression?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-meaning-of-my-regular-expression/m-p/286304#M86688</link>
      <description>&lt;P&gt;actually, from my own experience, if you learn Unix/Linux vi editor search and replace or sed command's search and replace, the regular expressions will become easy ( perl regular expressions as well )&lt;/P&gt;

&lt;P&gt;grymoire is a good resource.. please check it.. &lt;BR /&gt;
&lt;A href="http://www.grymoire.com/Unix/Sed.html"&gt;http://www.grymoire.com/Unix/Sed.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Sep 2016 16:36:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-meaning-of-my-regular-expression/m-p/286304#M86688</guid>
      <dc:creator>inventsekar</dc:creator>
      <dc:date>2016-09-19T16:36:02Z</dc:date>
    </item>
    <item>
      <title>Re: What is the meaning of my regular expression?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-meaning-of-my-regular-expression/m-p/286305#M86689</link>
      <description>&lt;P&gt;Hi @namritha - If @JoshuaJohn or @sundareshr were helpful in answering your question, please don't forget to click on "Accept" below the best answer to resolve this post. Also, be sure to upvote any comments you found helpful too. Thanks! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Sep 2016 22:47:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-meaning-of-my-regular-expression/m-p/286305#M86689</guid>
      <dc:creator>aaraneta_splunk</dc:creator>
      <dc:date>2016-09-19T22:47:24Z</dc:date>
    </item>
  </channel>
</rss>

