【发布时间】:2017-10-10 00:15:12
【问题描述】:
我需要一个匹配电子邮件地址的正则表达式,但从匹配项中排除特定的电子邮件地址
例如不匹配(从匹配中排除这些地址);
sponge.bob@example.com
jim.bob@example.com
billy.bob@example.com
匹配所有其他电子邮件地址(包括任何其他有效的电子邮件地址);
test@example.com
no.body@example.com
another.test.email@example.com
and.another.one@example.com.au
我尝试使用否定的lookbehind 表达式,但不知道如何使其工作(如果甚至可以通过该方法)。能够指定多个排除的电子邮件将是有益的,但至少需要排除一个。
谢谢
【问题讨论】:
-
你想匹配什么,你不想匹配什么?编辑您的问题,使其更具体。
标签: regex