Splunk Search

Replace a string with other 2 strings

Loves-to-Learn Lots

Hi ,

I need to replace the string in a field value role_seu_458137407337_prd-sso-data-science-752-2205-compute-role"     -- >  compute-role should be replaced as below 2 other field values .



I have tried replace command compute-role WITH pl IN ad. It didnt work

What would be the solution for this .Please help 

Labels (1)
0 Karma


Hi @hashsplunk,

Below should work;

| eval ad=replace(ad,"compute-role","pl")


If this reply helps you, an upvote is appreciated.

If this reply helps you an upvote is appreciated.
0 Karma
Get Updates on the Splunk Community!

SplunkTrust | Where Are They Now - Michael Uschmann

The Background Five years ago, Splunk published several videos showcasing members of the SplunkTrust to share ...

Admin Your Splunk Cloud, Your Way

Join us to maximize different techniques to best tune Splunk Cloud. In this Tech Enablement, you will get ...

Cloud Platform | Discontinuing support for TLS version 1.0 and 1.1

Overview Transport Layer Security (TLS) is a security communications protocol that lets two computers, ...