Given:
lst = ['(abc): my name is ?123']
I'm trying to return everything from ': ' till the end of lst[0], for that I tried a regex expression:
result = re.search(r': (.*?)', lst[0]).group(1)
It returns an empty string. How can this be done using regex correctly? Expected output :
'my name is ?123'
Resources used : Regex wiki
?fromr': (.*?)'. It makes your regex stop after the first matching character.