Splunk Search

How do I write a search to replace an asterisk character in a string?

szabados
Communicator

I want to replace the * character in a string with the replace command. How do I apply the * by escaping it, not to replace the whole string?

0 Karma

chimell
Motivator

Hi
You can use rex command with mode=sed attribute . see the following

 ..........................| rex mode=sed "s/\"\"/\"\*\"/g"

renjith_nair
Legend

Try

eval my-new-field=replace(string-to-replace,"\*","")
Happy Splunking!
Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...