regexp = '[\\w\\.]+@(\\w+)(\\.\\w+)?(\\.\\w+)?(\\.\\w+)?(\\.\\w+)?(\\.\\w+)?'
email_address = 'william.adama@galactica.caprica.fleet.mil'
m = re.match(regexp, email_address)
Capturing repeating subpatterns in Python regex