<?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: How do I edit my search to remove specific substrings from URI values in my results? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-search-to-remove-specific-substrings-from-URI/m-p/230003#M68160</link>
    <description>&lt;P&gt;Append a regex to your query and remove that bit from the URI. Something like this should do the trick:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex field=uri_domain "(?i)(?&amp;lt;shortUri&amp;gt;http[s]?:\/\/.+);jsessionid="
| stats count by shortUri
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 12 Jan 2016 15:51:53 GMT</pubDate>
    <dc:creator>javiergn</dc:creator>
    <dc:date>2016-01-12T15:51:53Z</dc:date>
    <item>
      <title>How do I edit my search to remove specific substrings from URI values in my results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-search-to-remove-specific-substrings-from-URI/m-p/230002#M68159</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;ri_domain=HTTPS://xxxxxxx.com "*.jsp*" | top  limit=10 uri
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Under the statistics tab, I get different URIs with count, however, I get jsessionid associated with it which I want to remove.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;URI                                                                Count
&lt;A href="HTTPS://XXXX/A.jsp;jsessionid=0000iy48i-7oVdu8hQYd-jEvD7j:19heb2fp1" target="test_blank"&gt;HTTPS://XXXX/A.jsp;jsessionid=0000iy48i-7oVdu8hQYd-jEvD7j:19heb2fp1&lt;/A&gt;     4   
&lt;A href="HTTPS://XXXX/A.jsp;jsessionid=0000U58zotFsxkfo9r0e3Ezm7Y6:19heb2ljm" target="test_blank"&gt;HTTPS://XXXX/A.jsp;jsessionid=0000U58zotFsxkfo9r0e3Ezm7Y6:19heb2ljm&lt;/A&gt;     4    
&lt;A href="HTTPS://XXXX/B.jsp;jsessionid=0000YnYZmfqe8do_D74u4XCdacW:19hedg444" target="test_blank"&gt;HTTPS://XXXX/B.jsp;jsessionid=0000YnYZmfqe8do_D74u4XCdacW:19hedg444&lt;/A&gt;     2   
&lt;A href="HTTPS://XXXX/B.jsp;jsessionid=0000SrOcfEmPIThFzwfoKFs3J8y:19hedg444" target="test_blank"&gt;HTTPS://XXXX/B.jsp;jsessionid=0000SrOcfEmPIThFzwfoKFs3J8y:19hedg444&lt;/A&gt;     2    
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I would like to ignore the substring jsession id and the results should look like&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;URI               Count
&lt;A href="HTTPS://XXXX/A.jsp" target="test_blank"&gt;HTTPS://XXXX/A.jsp&lt;/A&gt;     8   
&lt;A href="HTTPS://XXXX/B.jsp" target="test_blank"&gt;HTTPS://XXXX/B.jsp&lt;/A&gt;     4   
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I tried with &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;uri_domain=HTTPS://xxxxxxx.com "*.jsp*" NOT jsessionid | top  limit=10 uri
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;but it displays 0 results.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jan 2016 13:52:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-search-to-remove-specific-substrings-from-URI/m-p/230002#M68159</guid>
      <dc:creator>manjunathin</dc:creator>
      <dc:date>2016-01-12T13:52:18Z</dc:date>
    </item>
    <item>
      <title>Re: How do I edit my search to remove specific substrings from URI values in my results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-search-to-remove-specific-substrings-from-URI/m-p/230003#M68160</link>
      <description>&lt;P&gt;Append a regex to your query and remove that bit from the URI. Something like this should do the trick:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex field=uri_domain "(?i)(?&amp;lt;shortUri&amp;gt;http[s]?:\/\/.+);jsessionid="
| stats count by shortUri
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 12 Jan 2016 15:51:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-search-to-remove-specific-substrings-from-URI/m-p/230003#M68160</guid>
      <dc:creator>javiergn</dc:creator>
      <dc:date>2016-01-12T15:51:53Z</dc:date>
    </item>
    <item>
      <title>Re: How do I edit my search to remove specific substrings from URI values in my results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-search-to-remove-specific-substrings-from-URI/m-p/230004#M68161</link>
      <description>&lt;P&gt;Right - doing the NOT jsessionid removes all events (rows) where the string "jsessionid" is in it which is not what you want.&lt;/P&gt;

&lt;P&gt;There are several ways to fix this, but an easy question first:&lt;/P&gt;

&lt;P&gt;Could you repaste the search you were using, only use the little code buttons in the editor to flag it as code?  That way special characters won't get eaten.&lt;/P&gt;

&lt;P&gt;I think the fix will be easy once we see the search itself, but there's two or three different things that could be happening given your search string and example output and I'd like to solve your actual problem instead of my guess at your problem.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jan 2016 15:53:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-search-to-remove-specific-substrings-from-URI/m-p/230004#M68161</guid>
      <dc:creator>Richfez</dc:creator>
      <dc:date>2016-01-12T15:53:34Z</dc:date>
    </item>
    <item>
      <title>Re: How do I edit my search to remove specific substrings from URI values in my results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-search-to-remove-specific-substrings-from-URI/m-p/230005#M68162</link>
      <description>&lt;P&gt;Thanks rich, was bale to figure out with your hint.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jan 2016 11:04:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-search-to-remove-specific-substrings-from-URI/m-p/230005#M68162</guid>
      <dc:creator>manjunathin</dc:creator>
      <dc:date>2016-01-14T11:04:29Z</dc:date>
    </item>
    <item>
      <title>Re: How do I edit my search to remove specific substrings from URI values in my results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-search-to-remove-specific-substrings-from-URI/m-p/230006#M68163</link>
      <description>&lt;P&gt;How to just ignore the ;jsessionid=  ? Your code will only find records that DO have it, not the ones that do not have it&lt;/P&gt;</description>
      <pubDate>Tue, 13 Mar 2018 14:08:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-edit-my-search-to-remove-specific-substrings-from-URI/m-p/230006#M68163</guid>
      <dc:creator>mplungjan</dc:creator>
      <dc:date>2018-03-13T14:08:59Z</dc:date>
    </item>
  </channel>
</rss>

