https://www.forum.thegamecreators.com/board/junk.html
I'm trying to split a url up (im using java). For the most part it's simple enough splitting the string with a forward slash delimiter. However, sometimes address will have http or www and sometimes it won't. If it doesn't, then all is well and I can assume the first token is the domain. But if it does, the regex matches the slashes after http, leaving me with the first two tokens as "https:" and "" (empty string). This is no good as then I cannot assume which token is the domain.
I was trying to match only slashes which have been preceded by a period anywhere in the string, but I'm not sure how to do that. I tried using look behind but I'm not familiar enough with them to make it work. I'm not even sure if it can look behind by a variable length like this. If I can do then, then the first slash that matches would be after the .com

"I like offending people, because I think people who get offended should be offended." - Linus Torvalds