=RIGHT(A1, LEN(A1) - SEARCH(CHAR(127), SUBSTITUTE(A1, "/", CHAR(127), 3)))
- Input:
https://gist.github.com/hello/world/
- Output:
hello/world
Description:
SUBSITUTE()
replaces the 3rd slash with a dummy i.e., NBSP (non-breaking space) which is the 127th character in the ANSI set.SEARCH()
returns the location of the dummy.LEN() - SEARCH()
returns the length from the location of the dummy until the end of the URL.RIGHT()
returns the substring.
Pre-requisite(s):
- A1 does not contain the dummy character
- A1 starts with "http://" or "https://"