How to get the string after 2 colons
:somelongstring::123abc:
how to get only the string 123abc
i tried this: Regex to find a string after the last colon
How to get the string after 2 colons
:somelongstring::123abc:
how to get only the string 123abc
i tried this: Regex to find a string after the last colon
I'm pretty sure you just want this:
"::(\w+)"
If I understood you correctly you want to find anything that is after double colon "::" and before single colon ":", as it is in your example. You could use this regex:
regex = "::(.*):";
This basically tells: Give me everything that starts with "::" and ends with ":" but without those start and end characters.