I have 2 urls from soundcloud that I would like to get everything after .com / (or) .sc /, I donโt understand regex at all, I could execute javascript match / replace, only the problem is that http vs https
https://soundcloud.com/ilyao/lyao-lj-mtx-and-lj-mtxs-hair http://snd.sc/1cvgIjv
Any help would be greatly appreciated.
Here is what I have, I donโt know how to make https replacements, or if this is the best way to approach this ...
function getSoundCloudInfo(url){ return url.replace("https://soundcloud.com/", "").replace("http://snd.sc/", ""); }
source share