I am trying to simplify a baseURL string with action script 2.
But I am having trouble as my base URL could have to possible begginings.
What I have so far.. Thanks to @Will Kru
.split("http://").join("").split("/")[0];
So if my baseURL is this… http://www.actionscript.com/category/splitting
Then the above code would return… http://www.actionscript.com
My next problem is, the baseURL could be in SSL mode. So the beggining of the string would be https://
So my question is – is there anyway to split the baseURL from the first :// and remove what ever appears before the :// – wether it is http or https
Many Thanks
You can use this.