I need to get the value after the last colon in this example 1234567
client:user:username:type:1234567
I don’t need anything else from the string just the last id value.
To split on the first occurrence instead, see Splitting on first occurrence.
If you string does not have any
:, the result will contain the original string.An alternative that is supposed to be a little bit slower is: