Split string on the last occurrence of a character

Viewed 2033

I have the string below:

this sentence: should be: split after last colon: sentence

I want to split the above string on the last colon (:) such that the resulting array will contain these two elements:

["this sentence: should be: splited after last colon:", "sentence"]
2 Answers
Related