Splunk Search

sed replace help

mcbradford
Contributor

I am using the following:

eval link=http_referrer+uri_path | top link

and I get

http://www.foxnews.com//static/includes/partners/dma/520.html

I want to remove the double "//" and replace it with just one "/"

I cannot get my regex to work???

Tags (1)

Ayn
Legend
... | rex mode=sed field=link "s/\/\//\//"

mcbradford
Contributor

|eval http_referrer = substr(http_referrer, 1, len(http_referrer)-1)| eval link=http_referrer+uri_path |

0 Karma
Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...