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
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Data Persistence in the OpenTelemetry Collector

This blog post is part of an ongoing series on OpenTelemetry. What happens if the OpenTelemetry collector ...

Introducing Splunk 10.0: Smarter, Faster, and More Powerful Than Ever

Now On Demand Whether you're managing complex deployments or looking to future-proof your data ...

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...