<?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: Remove the query string from a Url field in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Remove-the-query-string-from-a-Url-field/m-p/56105#M179835</link>
    <description>&lt;P&gt;Ah. Updated my answer with a corrected regex.&lt;/P&gt;</description>
    <pubDate>Thu, 06 Dec 2012 12:37:22 GMT</pubDate>
    <dc:creator>Ayn</dc:creator>
    <dc:date>2012-12-06T12:37:22Z</dc:date>
    <item>
      <title>Remove the query string from a Url field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Remove-the-query-string-from-a-Url-field/m-p/56102#M179832</link>
      <description>&lt;P&gt;Need to exclude the query parameters from a URL field. &lt;BR /&gt;
For e.g. the field contains &lt;A href="http://www.google.com/india?search=splunk"&gt;http://www.google.com/india?search=splunk&lt;/A&gt;. I need to substring this such that result field only contains &lt;A href="http://www.google.com/india"&gt;http://www.google.com/india&lt;/A&gt; i.e. remove the part following "?" character. Tried using the eval and the replace functions but did not work...&lt;/P&gt;</description>
      <pubDate>Thu, 06 Dec 2012 12:18:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Remove-the-query-string-from-a-Url-field/m-p/56102#M179832</guid>
      <dc:creator>gassershaun</dc:creator>
      <dc:date>2012-12-06T12:18:36Z</dc:date>
    </item>
    <item>
      <title>Re: Remove the query string from a Url field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Remove-the-query-string-from-a-Url-field/m-p/56103#M179833</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;... | rex field=your_url_field "^(?&amp;lt;your_new_url_field&amp;gt;.+?)\?"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 06 Dec 2012 12:20:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Remove-the-query-string-from-a-Url-field/m-p/56103#M179833</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2012-12-06T12:20:53Z</dc:date>
    </item>
    <item>
      <title>Re: Remove the query string from a Url field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Remove-the-query-string-from-a-Url-field/m-p/56104#M179834</link>
      <description>&lt;P&gt;Thanks it works.. however one small problem I get the result as &lt;A href="http://www.google.com/india"&gt;http://www.google.com/india&lt;/A&gt;? and not as &lt;A href="http://www.google.com/india"&gt;http://www.google.com/india&lt;/A&gt; I also need to get rid of the ending ?&lt;/P&gt;</description>
      <pubDate>Thu, 06 Dec 2012 12:35:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Remove-the-query-string-from-a-Url-field/m-p/56104#M179834</guid>
      <dc:creator>gassershaun</dc:creator>
      <dc:date>2012-12-06T12:35:26Z</dc:date>
    </item>
    <item>
      <title>Re: Remove the query string from a Url field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Remove-the-query-string-from-a-Url-field/m-p/56105#M179835</link>
      <description>&lt;P&gt;Ah. Updated my answer with a corrected regex.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Dec 2012 12:37:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Remove-the-query-string-from-a-Url-field/m-p/56105#M179835</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2012-12-06T12:37:22Z</dc:date>
    </item>
    <item>
      <title>Re: Remove the query string from a Url field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Remove-the-query-string-from-a-Url-field/m-p/56106#M179836</link>
      <description>&lt;P&gt;Ayn's answer fails if the URL does not include a question mark. Here is a regex that works for URLs with and without a question mark:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;| rex field=your_url_field "^(?&amp;lt;your_new_url_field&amp;gt;[^?]+)&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Mar 2018 18:04:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Remove-the-query-string-from-a-Url-field/m-p/56106#M179836</guid>
      <dc:creator>zsteinkamp_splu</dc:creator>
      <dc:date>2018-03-14T18:04:01Z</dc:date>
    </item>
  </channel>
</rss>

