I'm working with a third party library that concatenates a string with a double colon ::. I need to split that string because the element on the right hand side is important to me, but the left doesn't matter.
ie
This is not what I want::what-i-want
Note: the text on the right hand side does not contain any : characters
I need to write a regex to get the text on the right hand side.
string.split(/::(.*)$/)
but this doesn't work because the text on the left hand side does can contain : characters
The regex needs to work for this case
var string = ":this:should:split::correctly:::and-return-this"