How to find all emails (on the same line)
Christos TZOTZIOY Georgiou
DLNXPEGFQVEB at spammotel.com
Thu Jun 20 10:34:36 EDT 2002
On Thu, 20 Jun 2002 10:12:20 +0200, rumours say that "A"
<printers at sendme.cz> might have written:
>Hi,
>I need to find ALL emails in a file. I can use re module but I do not
>know how to find all emails if there are more emails on the same
>line because re module ( as far as I know )finds only one/first
>occurrence on that line.
>Thanks for help.
>Ladislav
At first, as /F noted first, you are very vague.
Presumably you want to find all e-mail *addresses* in a text file.
If that is the case, you can start by opening a Python interpreter, and
give:
help(file.read)
import re
help(re.findall)
terse-but-hopefully-not-as-vague-ly y'rs
--
TZOTZIOY, I speak England very best,
Real email address: 'dHpvdEBzaWwtdGVjLmdy\n'.decode('base64')
More information about the Python-list
mailing list