I am trying to get the characters between a URL like so in postgreSQL:
www.abc.com/hello/xyz
www.abc.com/hi/pqr
www.abc.com/yellow/xyz
I want to get
hello
hi
yellow
This is what I have so far:
select distinct substring(url, position('/' in url)+ 1) theURL from table;
I am only able to get the first "/"
I am not sure how to get the position of the second one