(<)?(\...@\w+(?:\.\w+)+)(?(1)>)

这个表达式在python 中可以工作,但我在sed 没有试通,也许你试用perl 看看

2010/6/18 listofx <[email protected]>:
> 通常,邮件头中发件人有如下格式
> From: xxx yyy <[email protected]>
> From: “xxx yyy” <[email protected]>
> From: [email protected]
>
> 我想提取这样一行中的地址(只是[email protected]),该如何进行?
>
> 我知道:如果不考虑第三种情况,采用<字符作为字段分隔符,使用cut或者awk就
> 很容易得到结果。
>
> sed能做到吗?
> 在发邮件的时候,我想到一个办法,还是想看看是否有别的方式。
>
>
> --
> ubuntu-zh mailing list
> [email protected]
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-zh
>



-- 
Ray Wang
  - Follow your dreams
-- 
ubuntu-zh mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-zh

回复