How to do Email validation using Regular expression in Typescript

This question already has an answer here:

  • How to validate an email address in JavaScript? 68 answers

  • Problem is with the regex format given. Give it without quotes (') like this

    regexp = new RegExp(/^(([^<>()[].,;:s@"]+(.[^<>()[].,;:s@"]+)*)|(".+"))@(([[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}])|(([a-zA-Z-0-9]+.)+[a-zA-Z]{2,}))$/);
    
    链接地址: http://www.djcxy.com/p/16502.html

    上一篇: 强制一个文本字段是一个有效的电子邮件?

    下一篇: 如何在Typescript中使用正则表达式进行电子邮件验证