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,"\*","")
---
What goes around comes around. If it helps, hit it with Karma 🙂
Get Updates on the Splunk Community!

Now Playing: Splunk Education Summer Learning Premieres

It’s premiere season, and Splunk Education is rolling out new releases you won’t want to miss. Whether you’re ...

The Visibility Gap: Hybrid Networks and IT Services

The most forward thinking enterprises among us see their network as much more than infrastructure – it's their ...

Get Operational Insights Quickly with Natural Language on the Splunk Platform

In today’s fast-paced digital world, turning data into actionable insights is essential for success. With ...