Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9843

How to extract multiple paths from a single string of URLs in Google Sheets?

$
0
0

How can I get a subrange of second to last element in a formula under Google Sheets?

I'm trying to extract all occurrences of https://example.com/* in a cell which may contain multiple URLs scattered across a string like:

abc https://example.com/abc https://google.com/ghi https://example.com/def/abc

so that I get the paths in a single string, separated by spaces as follows:

abc def/abc

As SPLIT looks the easiest way for that, I need to get rid of the first item in a formula like:

=join("",
  arrayformula(
    regexextract(
      split(A5, "https://example.com/", false, true),
      "[a-zA-Z0-9/\?=_]+")
    )
  )

Viewing all articles
Browse latest Browse all 9843

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>