2006年09月07日 星期四 16:18
kakaryan,您好! >>> s = "<zzz在ddd.cn%3C/TD%3E%3C/TR>>" >>> s.lstrip(" zzz在ddd.cn 'zzz在ddd.cn' >>> 在 2006-09-07 15:03:00 您写道: >整理一个公司的员工邮件列表... >偶环保..不制造垃圾邮件... > >在06-9-7,Gavin <gavin在sz.net.cn> 写道: >> >> >> >> 准备搜集网页中的Email地址卖钱? :―) >> >> ----- Original Message ----- >> *发件人:* kakaryan <kakaryan在gmail.com> >> *收件人:* python-chinese在lists.python.cn >> *发送时间:* 2006年9月7日 14:56 >> *主题:* [python-chinese] 请问如何提取文件中的email地址? >> >> >> 地址是放在一个网页文件中的 >> 都是这样的格式 >> ").strip().split(" ")[0]>> xxx在ddd.com <yyy在ddd.net%3C/TD%3E%3C/TR>> >> yyy在ddd.net <zzz在ddd.cn%3C/TD%3E%3C/TR>> >> 试过几个正则表达式都不能把邮件地址提取出来... >> 请大家帮忙 >> >> ------------------------------ >> >> _______________________________________________ >> python-chinese >> Post: send python-chinese在lists.python.cn >> Subscribe: send subscribe to python-chinese-request在lists.python.cn >> Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn >> Detail Info: http://python.cn/mailman/listinfo/python-chinese >> >> >> _______________________________________________ >> python-chinese >> Post: send python-chinese在lists.python.cn >> Subscribe: send subscribe to python-chinese-request在lists.python.cn >> Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn >> Detail Info: http://python.cn/mailman/listinfo/python-chinese >> >_______________________________________________ >python-chinese >Post: send python-chinese在lists.python.cn >Subscribe: send subscribe to python-chinese-request在lists.python.cn >Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn >Detail Info: http://python.cn/mailman/listinfo/python-chinese 致 礼! cry zyqmail在tom.com zzz在ddd.cn
2006年09月07日 星期四 16:21
лл... ÎÒÒ²ÕÒµ½Ò»¸ö°ì·¨... email.Utils.parseaddr() 2006/9/7, cry <zyqmail at tom.com>: > > kakaryan£¬ÄúºÃ£¡ > > >>> s = "<zzz at ddd.cn%3C/TD%3E%3C/TR>>" > >>> s.lstrip(" zzz at ddd.cn > 'zzz at ddd.cn' > >>> > > ÔÚ 2006-09-07 15:03:00 ÄúдµÀ£º > >ÕûÀíÒ»¸ö¹«Ë¾µÄÔ±¹¤ÓʼþÁбí... > >ż»·±£..²»ÖÆÔìÀ¬»øÓʼþ... > > > >ÔÚ06-9-7£¬Gavin <gavin at sz.net.cn> дµÀ£º > >> > >> > >> > >> ×¼±¸ËѼ¯ÍøÒ³ÖеÄEmailµØÖ·ÂôÇ®£¿ £º¨D£© > >> > >> ----- Original Message ----- > >> *·¢¼þÈË:* kakaryan <kakaryan at gmail.com> > >> *ÊÕ¼þÈË:* python-chinese at lists.python.cn > >> *·¢ËÍʱ¼ä:* 2006Äê9ÔÂ7ÈÕ 14:56 > >> *Ö÷Ìâ:* [python-chinese] ÇëÎÊÈçºÎÌáÈ¡ÎļþÖеÄemailµØÖ·£¿ > >> > >> > >> µØÖ·ÊÇ·ÅÔÚÒ»¸öÍøÒ³ÎļþÖÐµÄ > >> ¶¼ÊÇÕâÑùµÄ¸ñʽ > >> ").strip().split(" ")[0]> >> xxx at ddd.com <yyy at ddd.net%3C/TD%3E%3C/TR>> > >> yyy at ddd.net <zzz at ddd.cn%3C/TD%3E%3C/TR>> > >> ÊÔ¹ý¼¸¸öÕýÔò±í´ïʽ¶¼²»ÄÜ°ÑÓʼþµØÖ·ÌáÈ¡³öÀ´... > >> Çë´ó¼Ò°ïæ > >> > >> ------------------------------ > >> > >> _______________________________________________ > >> python-chinese > >> Post: send python-chinese at lists.python.cn > >> Subscribe: send subscribe to python-chinese-request at lists.python.cn > >> Unsubscribe: send unsubscribe to > python-chinese-request at lists.python.cn > >> Detail Info: http://python.cn/mailman/listinfo/python-chinese > >> > >> > >> _______________________________________________ > >> python-chinese > >> Post: send python-chinese at lists.python.cn > >> Subscribe: send subscribe to python-chinese-request at lists.python.cn > >> Unsubscribe: send unsubscribe to > python-chinese-request at lists.python.cn > >> Detail Info: http://python.cn/mailman/listinfo/python-chinese > >> > >_______________________________________________ > >python-chinese > >Post: send python-chinese at lists.python.cn > >Subscribe: send subscribe to python-chinese-request at lists.python.cn > >Unsubscribe: send unsubscribe to python-chinese-request at lists.python.cn > >Detail Info: http://python.cn/mailman/listinfo/python-chinese > > Ö > Àñ£¡ > > cry > zyqmail at tom.com > > > _______________________________________________ > python-chinese > Post: send python-chinese at lists.python.cn > Subscribe: send subscribe to python-chinese-request at lists.python.cn > Unsubscribe: send unsubscribe to python-chinese-request at lists.python.cn > Detail Info: http://python.cn/mailman/listinfo/python-chinese -------------- next part -------------- An HTML attachment was scrubbed... URL: http://python.cn/pipermail/python-chinese/attachments/20060907/a238e12c/attachment-0001.html zzz at ddd.cn
2006年09月07日 星期四 16:43
>>> import re >>> p='<[^>]+>([^].*@[^<]+)?>>> s= ' sdkl' >>> r=re.compile(p) >>> l=r.search(s) >>> l.groups() ('xxx在ddd.com',) >>> s=' xxx在ddd.com <yyy在ddd.net%3C/TD%3E%3C/TR>>' >>> l=r.search(s) >>> l.groups() (' yyy在ddd.net',) ----- Original Message ----- 发件人: "cry" <zyqmail在tom.com> 收件人: <python-chinese在lists.python.cn> 发送时间: 2006年9月7日 16:18 主题: Re: Re: [python-chinese] ȡļеemail ַ kakaryan,您好! >>> s = " yyy在ddd.net <zzz在ddd.cn%3C/TD%3E%3C/TR>>" >>> s.lstrip(" zzz在ddd.cn 'zzz在ddd.cn' >>> 在 2006-09-07 15:03:00 您写道: >整理一个公司的员工邮件列表... >偶环保..不制造垃圾邮件... > >在06-9-7,Gavin <gavin在sz.net.cn> 写道: >> >> >> >> 准备搜集网页中的Email地址卖钱? :―) >> >> ----- Original Message ----- >> *发件人:* kakaryan <kakaryan在gmail.com> >> *收件人:* python-chinese在lists.python.cn >> *发送时间:* 2006年9月7日 14:56 >> *主题:* [python-chinese] 请问如何提取文件中的email地址? >> >> >> 地址是放在一个网页文件中的 >> 都是这样的格式 >> ").strip().split(" ")[0]>> xxx在ddd.com <yyy在ddd.net%3C/TD%3E%3C/TR>> >> yyy在ddd.net <zzz在ddd.cn%3C/TD%3E%3C/TR>> >> 试过几个正则表达式都不能把邮件地址提取出来... >> 请大家帮忙 >> >> ------------------------------ >> >> _______________________________________________ >> python-chinese >> Post: send python-chinese在lists.python.cn >> Subscribe: send subscribe to python-chinese-request在lists.python.cn >> Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn >> Detail Info: http://python.cn/mailman/listinfo/python-chinese >> >> >> _______________________________________________ >> python-chinese >> Post: send python-chinese在lists.python.cn >> Subscribe: send subscribe to python-chinese-request在lists.python.cn >> Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn >> Detail Info: http://python.cn/mailman/listinfo/python-chinese >> >_______________________________________________ >python-chinese >Post: send python-chinese在lists.python.cn >Subscribe: send subscribe to python-chinese-request在lists.python.cn >Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn >Detail Info: http://python.cn/mailman/listinfo/python-chinese 致 礼! cry zyqmail在tom.com _______________________________________________ python-chinese Post: send python-chinese在lists.python.cn Subscribe: send subscribe to python-chinese-request在lists.python.cn Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn Detail Info: http://python.cn/mailman/listinfo/python-chinese zzz在ddd.cn
2006年09月07日 星期四 17:01
修正如下: >>> s= ' sdkl' >>> p='<[^>]+>([^]+@[^<]+)' >>> r=re.compile(p) >>> l=r.search(s) >>> l.groups() ('xxx在ddd.com',) >>> s= ' sdkl xxx在ddd.com ' >>> l=r.search(s) >>> l.groups() ('xxx在ddd.com ',) ----- Original Message ----- 发件人: "Gavin" <gavin在sz.net.cn> 收件人: <python-chinese在lists.python.cn> 发送时间: 2006年9月7日 16:43 主题: Re: [python-chinese] ȡļеemail ַ >>> import re >>> p='<[^>]+>([^].*@[^<]+)?>>> s= ' sdkl xxx在ddd.com ' >>> r=re.compile(p) >>> l=r.search(s) >>> l.groups() ('xxx在ddd.com',) >>> s=' xxx在ddd.com <yyy在ddd.net%3C/TD%3E%3C/TR>>' >>> l=r.search(s) >>> l.groups() (' yyy在ddd.net',) ----- Original Message ----- 发件人: "cry" <zyqmail在tom.com> 收件人: <python-chinese在lists.python.cn> 发送时间: 2006年9月7日 16:18 主题: Re: Re: [python-chinese] ȡļеemail ַ kakaryan,您好! >>> s = " yyy在ddd.net <zzz在ddd.cn%3C/TD%3E%3C/TR>>" >>> s.lstrip(" zzz在ddd.cn 'zzz在ddd.cn' >>> 在 2006-09-07 15:03:00 您写道: >整理一个公司的员工邮件列表... >偶环保..不制造垃圾邮件... > >在06-9-7,Gavin <gavin在sz.net.cn> 写道: >> >> >> >> 准备搜集网页中的Email地址卖钱? :―) >> >> ----- Original Message ----- >> *发件人:* kakaryan <kakaryan在gmail.com> >> *收件人:* python-chinese在lists.python.cn >> *发送时间:* 2006年9月7日 14:56 >> *主题:* [python-chinese] 请问如何提取文件中的email地址? >> >> >> 地址是放在一个网页文件中的 >> 都是这样的格式 >> ").strip().split(" ")[0]>> xxx在ddd.com <yyy在ddd.net%3C/TD%3E%3C/TR>> >> yyy在ddd.net <zzz在ddd.cn%3C/TD%3E%3C/TR>> >> 试过几个正则表达式都不能把邮件地址提取出来... >> 请大家帮忙 >> >> ------------------------------ >> >> _______________________________________________ >> python-chinese >> Post: send python-chinese在lists.python.cn >> Subscribe: send subscribe to python-chinese-request在lists.python.cn >> Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn >> Detail Info: http://python.cn/mailman/listinfo/python-chinese >> >> >> _______________________________________________ >> python-chinese >> Post: send python-chinese在lists.python.cn >> Subscribe: send subscribe to python-chinese-request在lists.python.cn >> Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn >> Detail Info: http://python.cn/mailman/listinfo/python-chinese >> >_______________________________________________ >python-chinese >Post: send python-chinese在lists.python.cn >Subscribe: send subscribe to python-chinese-request在lists.python.cn >Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn >Detail Info: http://python.cn/mailman/listinfo/python-chinese 致 礼! cry zyqmail在tom.com _______________________________________________ python-chinese Post: send python-chinese在lists.python.cn Subscribe: send subscribe to python-chinese-request在lists.python.cn Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn Detail Info: http://python.cn/mailman/listinfo/python-chinese _______________________________________________ python-chinese Post: send python-chinese在lists.python.cn Subscribe: send subscribe to python-chinese-request在lists.python.cn Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn Detail Info: http://python.cn/mailman/listinfo/python-chinese zzz在ddd.cn
2006年09月07日 星期四 17:13
²Çd4SI,Ç]u×(×L?ÓF³=ù¬ÀgO~®·¢jbêe®ÇÈl èº1Ç]uÊ&²Çd4SI,Ç]u×(ÉíwôÃý4e®ÇÈl èº1Ç]uÊ&r;{
Zeuux © 2025
京ICP备05028076号