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!

Community Content Calendar, November Edition

Welcome to the November edition of our Community Spotlight! Each month, we dive into the Splunk Community to ...

October Community Champions: A Shoutout to Our Contributors!

As October comes to a close, we want to take a moment to celebrate the people who make the Splunk Community ...

Stay Connected: Your Guide to November Tech Talks, Office Hours, and Webinars!

What are Community Office Hours? Community Office Hours is an interactive 60-minute Zoom series where ...