#!/usr/bin/python import re str = raw_input("String containing email...\t") match = re.search(r'[\w.-]+@[\w.-]+', str) if match: print match.group()
it's not the most complicated code, and i'm looking for a way to get ALL of the matches, if it's possible.