我想使用正则表达式获取 From 字段的所有电子邮件地址,例如获取所有以“From:”开头并以“/n”新行结尾的文本行。
这是我要应用此正则表达式的完整文本,
Sent: Tue Mar 05 15:42:11 IST 2019
From: xtest@xyz.co.in
To: akm@xyz.com
Subject: Re: Foausrnisfseur invadlide (030000000000:3143)
Message:
----------------------------
Sent: Tue Mar 05 15:40:51 IST 2019
From: ytest@xyz.com
To: bpcla@xpanxion.com
Subject: Foausrnisfseur invadlide (O4562000888885456:3143)
Message:
This is not right please correct
Termes de paiement Foausrnisfseur non spécifiés
impact potentiel: 3 000,00
You should write From field with abc@xyz.com
and not From: field with abc@xyz.com in the column
Date détecté: 2019-02-26 12:55:03
---- Please do not delete or modify this line. (2423000000000149:3143) ----
-------------------------
Sent: Tue Mar 05 15:40:51 IST 2019
From: ytest@xyz.co.in
To: bpcla@xpanxion.com
Subject: Foausrnisfseur invadlide (O4562000888885456:3143)
我尝试了以下模式,但没有奏效,
[^.?!]*(?<=[.?\s!])string(?:(?=[\s.?!])[^.?!]*(?:[.?!].*)?)?$
/^([\w\s\.]*)string([\w\s\.]*)$/
"^\\w*\\s*((?m)Name.*$)"
上述文本预期的预期结果是:
xtest@xyz.co.in, ytest@xyz.com, ytest@xyz.co.in,
PS。我想要 Java 逻辑的正则表达式
慕村225694
郎朗坤
波斯汪
不负相思意
相关分类