How do I extract the text from the beginning until (not including) the second to last occurrence of a charachter (":" in this case) from a string? Preferably without using regex.
Examples:
"urn:riv:intygsbestallning:certificate:order:RequestPerformerForAssessmentResponder:1" should become "RequestPerformerForAssessmentResponder:1"
"urn:riv:itinfra:tp:PingResponder:1" should become "PingResponder:1"