开发者

Email Regex for single character domain names

I have the following regex that only works with two letter domains or more. I need this to work with single letter domains as well. Please suggest changes to the regex below.

^(?("")("".+?""@)|(([0-9a-zA-Z]((\.(?!\.))|[-!#\$%&'\*\+/=\?\^`\开发者_开发技巧{\}\|~\w])*)(?<=[0-9a-zA-Z])@))(?(\[)(\[(\d{1,3}\.){3}\d{1,3}\])|(([0-9a-zA-Z][-\w]*[0-9a-zA-Z]\.)+[a-zA-Z]{2,6}))$


\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b 


This regex will cover single letter domains.

\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜