<?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: I am trying to get URLs out of logs in Splunk. I am getting an error. in Security</title>
    <link>https://community.splunk.com/t5/Security/I-am-trying-to-get-URLs-out-of-logs-in-Splunk-I-am-getting-an/m-p/278328#M7492</link>
    <description>&lt;P&gt;When Splunk says "missing a search command before [some character]", it means the parser got to that character and didn't understand what came next. You could either paste the search into a text editor and manually find character #57, or you could just look for all such characters in your search and try to determine if any of them could be confusing the parser.&lt;/P&gt;

&lt;P&gt;In this case, the issue is likely your regex's character set: [-a-zA-Z0-9...].  Even though it's supposed to be legal to lead off the character set with an unescaped hyphen, Splunk does not properly recognize it. You'll need to escape it with a backslash.&lt;/P&gt;</description>
    <pubDate>Fri, 13 Jan 2017 18:20:58 GMT</pubDate>
    <dc:creator>cphair</dc:creator>
    <dc:date>2017-01-13T18:20:58Z</dc:date>
    <item>
      <title>I am trying to get URLs out of logs in Splunk. I am getting an error.</title>
      <link>https://community.splunk.com/t5/Security/I-am-trying-to-get-URLs-out-of-logs-in-Splunk-I-am-getting-an/m-p/278326#M7490</link>
      <description>&lt;P&gt;my regex query is : xxx.xx.xxx.xxx|regex = (http(s)?:(\/\/)?(w{3}.)?[-a-zA-Z0-9@:%.&lt;EM&gt;+~#=]{2,256}(.[a-z]{2,256})?\b([-a-zA-Z0-9@:%&lt;/EM&gt;+.~#?&amp;amp;\/\/=]*)&lt;/P&gt;

&lt;P&gt;The x's are an IP that is also included in the search. I am not disclosing the IP. Sorry&lt;/P&gt;

&lt;P&gt;The error is: Error in 'SearchParser': Missing a search command before '-'. Error at position '57' of search query 'search xxx.xx.xxx.xxx|regex = (http(s)?:(\/\/)?(w{...{snipped} {errorcontext = (w{3}.)?[-a-zA-Z0-9@}'. &lt;/P&gt;

&lt;P&gt;HELP!!!! I don't understand the error!&lt;/P&gt;</description>
      <pubDate>Thu, 15 Sep 2016 00:48:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/I-am-trying-to-get-URLs-out-of-logs-in-Splunk-I-am-getting-an/m-p/278326#M7490</guid>
      <dc:creator>infosecowl</dc:creator>
      <dc:date>2016-09-15T00:48:50Z</dc:date>
    </item>
    <item>
      <title>Re: I am trying to get URLs out of logs in Splunk. I am getting an error.</title>
      <link>https://community.splunk.com/t5/Security/I-am-trying-to-get-URLs-out-of-logs-in-Splunk-I-am-getting-an/m-p/278327#M7491</link>
      <description>&lt;P&gt;To extract a URL without querystring, try this regex. You have too many special chars that need to escaped. Eg: ? s/b \?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(http(s)?[^\?]+)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you want to include the querystring, then try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(http(s)?[^\s]+)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 15 Sep 2016 02:00:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/I-am-trying-to-get-URLs-out-of-logs-in-Splunk-I-am-getting-an/m-p/278327#M7491</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-09-15T02:00:39Z</dc:date>
    </item>
    <item>
      <title>Re: I am trying to get URLs out of logs in Splunk. I am getting an error.</title>
      <link>https://community.splunk.com/t5/Security/I-am-trying-to-get-URLs-out-of-logs-in-Splunk-I-am-getting-an/m-p/278328#M7492</link>
      <description>&lt;P&gt;When Splunk says "missing a search command before [some character]", it means the parser got to that character and didn't understand what came next. You could either paste the search into a text editor and manually find character #57, or you could just look for all such characters in your search and try to determine if any of them could be confusing the parser.&lt;/P&gt;

&lt;P&gt;In this case, the issue is likely your regex's character set: [-a-zA-Z0-9...].  Even though it's supposed to be legal to lead off the character set with an unescaped hyphen, Splunk does not properly recognize it. You'll need to escape it with a backslash.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jan 2017 18:20:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/I-am-trying-to-get-URLs-out-of-logs-in-Splunk-I-am-getting-an/m-p/278328#M7492</guid>
      <dc:creator>cphair</dc:creator>
      <dc:date>2017-01-13T18:20:58Z</dc:date>
    </item>
  </channel>
</rss>

