<?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 How to write the regex to extract a number within a string and the path that appears after the string in my search results? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-the-regex-to-extract-a-number-within-a-string-and/m-p/258768#M77532</link>
    <description>&lt;P&gt;The following were the strings visible in my Splunk search results…&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;An error occurred at line: 127 in the jsp file: /uk/store.jsp
An error occurred at line: 23 in the jsp file: /browse/find_it_content.jsp
An error occurred at line: 1 in the jsp file: /browse/find_it_content.jsp
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Now I want to extract the field and display the count for the path that appears after the string &lt;CODE&gt;An error occurred at line: 1 in the jsp file:&lt;/CODE&gt; and also for the line number it appeared. &lt;/P&gt;

&lt;P&gt;Need the results like this :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Line_number        file                   count
56                 /browse/stats.jsp      (some count)
….                 ……..                   (some count)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 05 Oct 2015 20:07:50 GMT</pubDate>
    <dc:creator>pavanae</dc:creator>
    <dc:date>2015-10-05T20:07:50Z</dc:date>
    <item>
      <title>How to write the regex to extract a number within a string and the path that appears after the string in my search results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-the-regex-to-extract-a-number-within-a-string-and/m-p/258768#M77532</link>
      <description>&lt;P&gt;The following were the strings visible in my Splunk search results…&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;An error occurred at line: 127 in the jsp file: /uk/store.jsp
An error occurred at line: 23 in the jsp file: /browse/find_it_content.jsp
An error occurred at line: 1 in the jsp file: /browse/find_it_content.jsp
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Now I want to extract the field and display the count for the path that appears after the string &lt;CODE&gt;An error occurred at line: 1 in the jsp file:&lt;/CODE&gt; and also for the line number it appeared. &lt;/P&gt;

&lt;P&gt;Need the results like this :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Line_number        file                   count
56                 /browse/stats.jsp      (some count)
….                 ……..                   (some count)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 05 Oct 2015 20:07:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-the-regex-to-extract-a-number-within-a-string-and/m-p/258768#M77532</guid>
      <dc:creator>pavanae</dc:creator>
      <dc:date>2015-10-05T20:07:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to write the regex to extract a number within a string and the path that appears after the string in my search results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-the-regex-to-extract-a-number-within-a-string-and/m-p/258769#M77533</link>
      <description>&lt;P&gt;This should get you started.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | rex "An error occurred at line: (?&amp;lt;Line_number&amp;gt;\d+) in the jsp file: (?&amp;lt;file&amp;gt;.*)" | stats count by Line_number file | table Line_number file count
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 05 Oct 2015 20:32:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-the-regex-to-extract-a-number-within-a-string-and/m-p/258769#M77533</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2015-10-05T20:32:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to write the regex to extract a number within a string and the path that appears after the string in my search results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-the-regex-to-extract-a-number-within-a-string-and/m-p/258770#M77534</link>
      <description>&lt;P&gt;Worked Great Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Oct 2015 21:04:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-the-regex-to-extract-a-number-within-a-string-and/m-p/258770#M77534</guid>
      <dc:creator>pavanae</dc:creator>
      <dc:date>2015-10-05T21:04:41Z</dc:date>
    </item>
  </channel>
</rss>

