Splunk Search

How can I extract address from string?

Annieg
Observer

I have the following string:

SL=5601%20BLVD%20E%2C%20WESTON%20NEW%20YORK%2C%20NJ%20%2007093%20(WEST%20NEW%20YORK%20TOWN%2C%20HUDS...

I want to extract the address from this. I have tried regex with %20 and split but nothing works. 

Labels (2)
Tags (2)
0 Karma

PickleRick
SplunkTrust
SplunkTrust

Use urldecode(). Like this:

| makeresults 
| eval a="SL=5601%20BLVD%20E%2C%20WESTON%20NEW%20YORK%2C%20NJ%20%2007093%20(WEST%20NEW%20YORK%20TOWN%2C%20HUDS"
| eval b=urldecode(a)

BTW, you pasted whole URL to your Splunk environment. You should be more careful. Next time it might contain sensitive info.

0 Karma
Get Updates on the Splunk Community!

Prove Your Splunk Prowess at .conf25—No Prereqs Required!

Your Next Big Security Credential: No Prerequisites Needed We know you’ve got the skills, and now, earning the ...

Splunk Observability Cloud's AI Assistant in Action Series: Observability as Code

This is the sixth post in the Splunk Observability Cloud’s AI Assistant in Action series that digs into how to ...

Splunk Answers Content Calendar, July Edition I

Hello Community! Welcome to another month of Community Content Calendar series! For the month of July, we will ...