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!

Introducing the 2024 SplunkTrust!

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

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...