Splunk Search

My extracted field contains special characters in extracted value. How can I replace it with actual string value?

santosh_hb
Explorer

Hi,

My extracted field contains some special characters instead of actual string.

For ex:

Email_Address is the field name and it is extracted in the following way:

data@portal.com
data%40portal.com 

In the above, it is getting extracted in 2 ways. One with '@' and one more with '%40' instead of @
Whereas, the first one is correct?

Now, in my search, how can I replace %40 with @ and display only data@portal.com?

thanks

0 Karma
1 Solution

somesoni2
Revered Legend

Like this

..your search | eval Email_Address =urldecode(Email_Address)

View solution in original post

0 Karma

okayal
Explorer

Do you mean both emails are extracted, but are on separate lines in the same event?

If that's the case, try something like

<Your query> | rex field=Email_Address "(?<Email_Address>.+@[\w\.]+)\n"
0 Karma

somesoni2
Revered Legend

Like this

..your search | eval Email_Address =urldecode(Email_Address)
0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Community Content Calendar, September edition

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

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...