import re

m = re.match(r'^:(.+?)!(.+?)@(.+)$', ':apples!apples@apples.com')
print m.group(1)