Splunk Search

Convert Craig%40gmail.com to craig@gmail.com

craigpbrown
New Member

Hi,

Probably a simple answer, but how do I convert %40 to @. For example craig%40gmail.com to craig@gmail.com

Thanks in advance,
Craig

Tags (1)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

For the specific case, try the replace command

... | replace "%40" with "@" in foo | ...

or the replace function

... | eval foo = replace(foo, "%40", "@") | ...

For the more general case of any URL-encoded character, try the urldecode function

... | foo = urldecode(bar) | ...
---
If this reply helps you, Karma would be appreciated.

somesoni2
Revered Legend

+1 for urldecode function use.

0 Karma
Get Updates on the Splunk Community!

[Puzzles] Solve, Learn, Repeat: Dynamic formatting from XML events

This challenge was first posted on Slack #puzzles channelFor a previous puzzle, I needed a set of fixed-length ...

Enter the Agentic Era with Splunk AI Assistant for SPL 1.4

  🚀 Your data just got a serious AI upgrade — are you ready? Say hello to the Agentic Era with the ...

Stronger Security with Federated Search for S3, GCP SQL & Australian Threat ...

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...