<?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: Is there any workaround in Splunk to make a star to be considered as constant instead of wild card? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Is-there-any-workaround-in-Splunk-to-make-a-star-to-be/m-p/303947#M91411</link>
    <description>&lt;P&gt;In search, an asterisk is a wildcard.  There is no workaround.&lt;/P&gt;

&lt;P&gt;In a regex, an asterisk can be either a repeater, or it can be escaped &lt;CODE&gt;\*&lt;/CODE&gt; to be a plain asterisk.  &lt;/P&gt;

&lt;P&gt;When using &lt;CODE&gt;| like()&lt;/CODE&gt;, asterisk is a regular character and % is a wildcard.&lt;/P&gt;</description>
    <pubDate>Thu, 12 Oct 2017 04:58:18 GMT</pubDate>
    <dc:creator>DalJeanis</dc:creator>
    <dc:date>2017-10-12T04:58:18Z</dc:date>
    <item>
      <title>Is there any workaround in Splunk to make a star to be considered as constant instead of wild card?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-any-workaround-in-Splunk-to-make-a-star-to-be/m-p/303946#M91410</link>
      <description>&lt;P&gt;I have some fields as follows &lt;/P&gt;

&lt;P&gt;sql="Select * from &amp;amp; ABC"&lt;BR /&gt;
sql="Select * from xyz.ABC"&lt;BR /&gt;
sql="Select * from gh2_ABC"&lt;BR /&gt;
sql="Select * from 34,rABC"&lt;BR /&gt;
sql="Select * from xyz.gfr"&lt;/P&gt;

&lt;P&gt;Now I am trying to work on an event type as follows &lt;/P&gt;

&lt;P&gt;eventtype name :- test&lt;/P&gt;

&lt;P&gt;sourcetype="web" sql="Select * from *ABC"&lt;/P&gt;

&lt;P&gt;And now I want to consider the first star as a constant and the second star as a wild card. Is there any workaround in Splunk to make a star to be considered as constant instead of wild card?&lt;/P&gt;</description>
      <pubDate>Thu, 12 Oct 2017 03:52:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-any-workaround-in-Splunk-to-make-a-star-to-be/m-p/303946#M91410</guid>
      <dc:creator>pavanae</dc:creator>
      <dc:date>2017-10-12T03:52:04Z</dc:date>
    </item>
    <item>
      <title>Re: Is there any workaround in Splunk to make a star to be considered as constant instead of wild card?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-any-workaround-in-Splunk-to-make-a-star-to-be/m-p/303947#M91411</link>
      <description>&lt;P&gt;In search, an asterisk is a wildcard.  There is no workaround.&lt;/P&gt;

&lt;P&gt;In a regex, an asterisk can be either a repeater, or it can be escaped &lt;CODE&gt;\*&lt;/CODE&gt; to be a plain asterisk.  &lt;/P&gt;

&lt;P&gt;When using &lt;CODE&gt;| like()&lt;/CODE&gt;, asterisk is a regular character and % is a wildcard.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Oct 2017 04:58:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-any-workaround-in-Splunk-to-make-a-star-to-be/m-p/303947#M91411</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-10-12T04:58:18Z</dc:date>
    </item>
    <item>
      <title>Re: Is there any workaround in Splunk to make a star to be considered as constant instead of wild card?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-any-workaround-in-Splunk-to-make-a-star-to-be/m-p/303948#M91412</link>
      <description>&lt;P&gt;As far as I know there is no base search (with the &lt;CODE&gt;search&lt;/CODE&gt; command) that will make a * be a constant. But you can use the &lt;CODE&gt;regex&lt;/CODE&gt; command to do an asterisk as a constant. For example, the following works to find the asterisk as an asterisk:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval raw="sql=\"Select from &amp;amp; ABC\"
sql=\"Select from xyz.ABC\"
sql=\"Select * from xyz.gfr\""
|  makemv raw delim="
"  | mvexpand raw 
|  rename raw as _raw 
|  regex "Select \*"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you change the &lt;CODE&gt;regex&lt;/CODE&gt; to &lt;CODE&gt;search&lt;/CODE&gt;, you will get all three events, instead of just one. Hopefully this is something that you can use in your application.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Oct 2017 05:09:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-any-workaround-in-Splunk-to-make-a-star-to-be/m-p/303948#M91412</guid>
      <dc:creator>cpetterborg</dc:creator>
      <dc:date>2017-10-12T05:09:24Z</dc:date>
    </item>
  </channel>
</rss>

