在Notepad ++中,我想制作一个只保留该文本的电子邮件地址并删除其他所有内容的表达式。
想象一下,我们有以下文字:
Lorem ipsum dolor sit amet, <micorreo0@gmail.com>consectetur adipiscing elit. Curabitur ac risus molestie, laoreet ligula vitae, tincidunt risus.<micorreo1@gmail.com> Aliquam ut felis efficitur, iaculis nunc in, feugiat dui.<micorreo2@gmail.com> Etiam sodales ligula tellus, id vehicula augue aliquet eu. Nulla blandit maximus lectus, quis consequat metus vulputate suscipit. Duis finibus lorem justo, non sollicitudin urna aliquet a. Sed at ligula justo. Nam est ex, suscipit in facilisis nec, rutrum vitae urna<micorreo3@gmail.com>.
邮件总是在<>
标志之间。
答案 0 :(得分:0)
$.inArray
[^<]*(<[^>]+>)[^<]*
<强>解释强>
$1
<强>替换强>
[^<]* : 0 or more any character that is not <
( : begin capture group
< : literally <
[^>]+ : 1 or more any character that is not >
> : literally >
) : end group
[^<]* : 0 or more any character that is not <