正则表达式-获取电子邮件和数据


Regular expression - get e-mail and data

我发送电子邮件的程序出错。现在我有了导出电子邮件的文件。搜索正则表达式,只能得到返回路径中的电子邮件。

  Some content
  Return-Path: <email@domain.com>
  Some content

这个正则表达式应该执行您想要的操作:

(?=Return-Path:)([^'n]*)<([^>]*)>

演示:https://regex101.com/r/oL9kE8/2