<?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: literal * in search? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/literal-in-search/m-p/64045#M15832</link>
    <description>&lt;P&gt;you will want to do &lt;CODE&gt;"hi" "there" | regex _raw="hi\*there"&lt;/CODE&gt;, since that will first use the index to return only events containing "hi" and "there", then further filter down to items containing the exact string you're looking for.&lt;/P&gt;</description>
    <pubDate>Wed, 24 Aug 2011 19:39:28 GMT</pubDate>
    <dc:creator>gkanapathy</dc:creator>
    <dc:date>2011-08-24T19:39:28Z</dc:date>
    <item>
      <title>literal * in search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/literal-in-search/m-p/64040#M15827</link>
      <description>&lt;P&gt;Is it possible to search for a literal * character? If I had a string in a log that read "hi*there", and I wanted to search for it specifically&lt;/P&gt;</description>
      <pubDate>Wed, 24 Aug 2011 18:02:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/literal-in-search/m-p/64040#M15827</guid>
      <dc:creator>caphrim007</dc:creator>
      <dc:date>2011-08-24T18:02:54Z</dc:date>
    </item>
    <item>
      <title>Re: literal * in search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/literal-in-search/m-p/64041#M15828</link>
      <description>&lt;P&gt;The first thing that comes to mind is a regular expression. I tried the following and it seems to work:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex field=_raw "(?&amp;lt;myLiterals&amp;gt;\w*\*\w*)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The values of any data with "*" inside them at any point will be stored in the field "myLiterals". Did you only want the values, or did you also want the location of these values?&lt;/P&gt;</description>
      <pubDate>Wed, 24 Aug 2011 18:46:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/literal-in-search/m-p/64041#M15828</guid>
      <dc:creator>acdevlin</dc:creator>
      <dc:date>2011-08-24T18:46:29Z</dc:date>
    </item>
    <item>
      <title>Re: literal * in search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/literal-in-search/m-p/64042#M15829</link>
      <description>&lt;P&gt;Ideally I'd like to just have splunk return events like it normally does with the highlighting of what it matched on inline vs extracting the data with rex.&lt;/P&gt;

&lt;P&gt;The string I'm searching for is part of a much larger query, so piping to rex would only extract that particular string.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Aug 2011 18:52:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/literal-in-search/m-p/64042#M15829</guid>
      <dc:creator>caphrim007</dc:creator>
      <dc:date>2011-08-24T18:52:03Z</dc:date>
    </item>
    <item>
      <title>Re: literal * in search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/literal-in-search/m-p/64043#M15830</link>
      <description>&lt;P&gt;Ah, I see.&lt;/P&gt;

&lt;P&gt;In that case, we could use "regex" instead, which will only keep events that match the regular expression.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| regex _raw="\w*\*\w*" 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Is this closer to what you're after?&lt;/P&gt;</description>
      <pubDate>Wed, 24 Aug 2011 19:07:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/literal-in-search/m-p/64043#M15830</guid>
      <dc:creator>acdevlin</dc:creator>
      <dc:date>2011-08-24T19:07:04Z</dc:date>
    </item>
    <item>
      <title>Re: literal * in search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/literal-in-search/m-p/64044#M15831</link>
      <description>&lt;P&gt;Using the search language to search for a literal &lt;CODE&gt;*&lt;/CODE&gt; is currently unsupported.  One workaround is to disable "*" as wildcard and then you can search for it as a literal, but but then you no longer have any wildcard capabilities; which was unacceptable to me to so I did peruse that option with Splunk support.&lt;/P&gt;

&lt;P&gt;This is listed on the "Known Issues" page as follows:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;There is no way to escape an asterisk (*) in the search language. (SPL-30079)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Just to be clear, you can filter for a "&lt;CODE&gt;*&lt;/CODE&gt;" using a post-processing search command (e.g. by using &lt;CODE&gt;rex&lt;/CODE&gt; like in the answer above), but you can't actually search for one in your actual search.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Aug 2011 19:36:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/literal-in-search/m-p/64044#M15831</guid>
      <dc:creator>Lowell</dc:creator>
      <dc:date>2011-08-24T19:36:04Z</dc:date>
    </item>
    <item>
      <title>Re: literal * in search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/literal-in-search/m-p/64045#M15832</link>
      <description>&lt;P&gt;you will want to do &lt;CODE&gt;"hi" "there" | regex _raw="hi\*there"&lt;/CODE&gt;, since that will first use the index to return only events containing "hi" and "there", then further filter down to items containing the exact string you're looking for.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Aug 2011 19:39:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/literal-in-search/m-p/64045#M15832</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2011-08-24T19:39:28Z</dc:date>
    </item>
    <item>
      <title>Re: literal * in search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/literal-in-search/m-p/64046#M15833</link>
      <description>&lt;P&gt;what if I want to search for &lt;BR /&gt;
  "complex search" OR "hi*there"?  &lt;/P&gt;

&lt;P&gt;I don't want to have to embed complex search into a regex just to filter for literal asterixes.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Mar 2014 23:34:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/literal-in-search/m-p/64046#M15833</guid>
      <dc:creator>ben363</dc:creator>
      <dc:date>2014-03-27T23:34:37Z</dc:date>
    </item>
    <item>
      <title>Re: literal * in search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/literal-in-search/m-p/64047#M15834</link>
      <description>&lt;P&gt;You can use &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;"complex search" | where searchmatch("complex search") OR match("\*",_raw)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 28 Mar 2014 06:14:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/literal-in-search/m-p/64047#M15834</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2014-03-28T06:14:11Z</dc:date>
    </item>
  </channel>
</rss>

