Hi, I would like to extract "a...@efg.hij.xyz". But it only shows ".hij". Does anybody see what is wrong with it? Thanks.
$ cat main.py #!/usr/bin/env python # vim: set noexpandtab tabstop=2 shiftwidth=2 softtabstop=-1 fileencoding=utf-8: import re email_regex = re.compile('[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)') s = 'a...@efg.hij.xyz.' for email in re.findall(email_regex, s): print email $ ./main.py .hij -- Regards, Peng -- https://mail.python.org/mailman/listinfo/python-list