In python, I can easily search for the first occurrence of a regex within a string like this:
import re re.search(\"pattern\", \"target_text\")
One approach is to use split. For example if you wanted to get the last group after ':' in this sample string:
mystr = 'dafdsaf:ewrewre:cvdsfad:ewrerae' ':'.join(mystr.split(':')[-1:])