Getting Data In

After using an SED command in props.conf, how come our query with the replace command is no longer working?

cyber_castle
Path Finder

Hello,

I have one of the field in Cyberark which has a special character.

Retrieve [File
Monitor [FW] end
Monitor [FW] start
Monitor [DR] end
Monitor DR] start
Open File
Set Password
Logon
Logoff
Monitor Backup] end

SED Command in props.conf --> SEDCMD-cef_name = s/[][]/ /g

I have used SED command in props to replace the special characters, but the client is not happy because we are altering the real data and its syntax. Then, I have reverted the change and tried using the replace command, but for some reason, my replace command is not working.

replace(cef_name, "[ ]", "")

0 Karma
1 Solution

whrg
Motivator

Hello @cyber_castle,

If I understand correctly, you want to remove special characters while running a search.

Note that there is a replace command as well as a replace eval function.

I think you are better off here with the eval function:

| eval cef_name=replace(cef_name,"[\[\]]"," ")

View solution in original post

0 Karma

whrg
Motivator

Hello @cyber_castle,

If I understand correctly, you want to remove special characters while running a search.

Note that there is a replace command as well as a replace eval function.

I think you are better off here with the eval function:

| eval cef_name=replace(cef_name,"[\[\]]"," ")
0 Karma

cyber_castle
Path Finder

Thanks for your answer. It worked.

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...