我搜索了很多正则表达式模式,这对我来说很方便。我找不到
这是我的条件
1. email should not contain any space or special characters(excep @ and .)
2. email should not start with dot(.) or should not end with .(before @ symbot)
3. two dots should not come near.
4. @ symbol should not repeat.
字符串
这里有一些有效和无效的电子邮件ID,
firstname@gmail.com -- valid
firstname.@gmail.com -- invalid(dot and @ should not come closer)
firstname..lastname@gmail.com --invlid(two dots should not come closer)
firstname#lastname@gmail.com -- invalid(should not contain any special characters appart @ and .)
frist1991@gmail.com -- valid
first name@gmai.com -- invalie( should not allow any spaces)
.fristname@gmail.com --invalid(should not start with .)
型
我发现了很多电子邮件的正则表达式模式。但没有满足我的条件
先谢谢你,
1条答案
按热度按时间j13ufse21#
这将工作:
字符串
https://regex101.com/r/nen2SZ/1