<?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: Excluding a specific URL in Regex in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Excluding-a-specific-URL-in-Regex/m-p/313145#M163460</link>
    <description>&lt;P&gt;Hi!&lt;/P&gt;

&lt;P&gt;Yes, it works and this is what I wanted. Many thanks! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 25 Jan 2018 07:53:07 GMT</pubDate>
    <dc:creator>SplunkNewbie18</dc:creator>
    <dc:date>2018-01-25T07:53:07Z</dc:date>
    <item>
      <title>Excluding a specific URL in Regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Excluding-a-specific-URL-in-Regex/m-p/313141#M163456</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I read through forums on how to extract URLs using regex. But couldn't find those on how to exclude them.&lt;/P&gt;

&lt;P&gt;For example, how do I extract all domain &lt;STRONG&gt;except&lt;/STRONG&gt; for "google.com.sg". &lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jan 2018 06:05:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Excluding-a-specific-URL-in-Regex/m-p/313141#M163456</guid>
      <dc:creator>SplunkNewbie18</dc:creator>
      <dc:date>2018-01-22T06:05:11Z</dc:date>
    </item>
    <item>
      <title>Re: Excluding a specific URL in Regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Excluding-a-specific-URL-in-Regex/m-p/313142#M163457</link>
      <description>&lt;P&gt;it will help if you can share your query wherein you are able to extract the url.&lt;BR /&gt;
Also, what all urls do you want to exclude? Is it just one or do you have a list ?&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jan 2018 13:03:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Excluding-a-specific-URL-in-Regex/m-p/313142#M163457</guid>
      <dc:creator>Sukisen1981</dc:creator>
      <dc:date>2018-01-22T13:03:37Z</dc:date>
    </item>
    <item>
      <title>Re: Excluding a specific URL in Regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Excluding-a-specific-URL-in-Regex/m-p/313143#M163458</link>
      <description>&lt;P&gt;If I understand what you want - you will still will need to extract the 'google.com.sg' url, but you may want to exclude it from your search.&lt;/P&gt;

&lt;P&gt;You should be able to use &lt;CODE&gt;!=&lt;/CODE&gt; so assuming the extraction is called 'url':&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;your existing search&amp;gt; url!=google.com.sg*|&amp;lt;etc..&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 22 Jan 2018 13:15:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Excluding-a-specific-URL-in-Regex/m-p/313143#M163458</guid>
      <dc:creator>nickhills</dc:creator>
      <dc:date>2018-01-22T13:15:12Z</dc:date>
    </item>
    <item>
      <title>Re: Excluding a specific URL in Regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Excluding-a-specific-URL-in-Regex/m-p/313144#M163459</link>
      <description>&lt;P&gt;Hey, &lt;/P&gt;

&lt;P&gt;so you particularely asked about removing it via the use of regular expression.&lt;BR /&gt;
Let me give you an example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;google.com
google.com.sg
facebook.com
splunk.com
answers.splunk.com
idontknowanyurlsanymore.ru
iamahorseandilikeit.horse.me
factor.io
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I've built a regular expression using a negative lookahead &lt;CODE&gt;(?!...)&lt;/CODE&gt; to exclude the url from matching.&lt;BR /&gt;
&lt;CODE&gt;^(?!google\.com\.sg)(?&amp;lt;url&amp;gt;[^\n]+)(?:\n|)&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;&lt;A href="https://regex101.com/r/wQ74EI/1"&gt;https://regex101.com/r/wQ74EI/1&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Let me know if you need additional help and/or explanation.&lt;/P&gt;

&lt;P&gt;Cheers!&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jan 2018 14:40:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Excluding-a-specific-URL-in-Regex/m-p/313144#M163459</guid>
      <dc:creator>horsefez</dc:creator>
      <dc:date>2018-01-22T14:40:02Z</dc:date>
    </item>
    <item>
      <title>Re: Excluding a specific URL in Regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Excluding-a-specific-URL-in-Regex/m-p/313145#M163460</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;

&lt;P&gt;Yes, it works and this is what I wanted. Many thanks! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jan 2018 07:53:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Excluding-a-specific-URL-in-Regex/m-p/313145#M163460</guid>
      <dc:creator>SplunkNewbie18</dc:creator>
      <dc:date>2018-01-25T07:53:07Z</dc:date>
    </item>
  </channel>
</rss>

