Splunk Search

How to Use * in escape sequence?

Madhan45
Path Finder

We can use \ as an escape sequence for special characters ",",(,),[,] and so on. How to use for * character?

0 Karma

badarsebard
Communicator

If I understand your meaning, you are trying to find events that contain the asterisk (*) character. If so, then this is not possible using the backslash since Splunk treats the asterisk as a major breaker (see Event Segmentation below). According to the Search manual, if you want to search for an asterisk you will need to run a post-filtering regex search on the data, such as:

index=_internal | regex ".*\*.*"

References:
Event Segmentation - http://docs.splunk.com/Documentation/Splunk/6.2.1/Data/Abouteventsegmentation
Search Manual (About Seach Language Syntax) - http://docs.splunk.com/Documentation/Splunk/6.2.1/Search/Aboutsearchlanguagesyntax

0 Karma

Madhan45
Path Finder

oh thanks badarsebard

0 Karma

richgalloway
SplunkTrust
SplunkTrust

In what command do you want to escape the *?

---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...