RFC822: email address validation with regular expressions

后端 未结 5 432
醉酒成梦
醉酒成梦 2020-12-07 03:40

as you know, this is how we validate an email address:

(?:(?:\\r\\n)?[ \\t])*(?:(?:(?:[^()<>@,;:\\\\\".\\[\\] \\000-\\031]+(?:(?:(?:\\r\\n)?[ \\t]
)+|\         


        
5条回答
  •  醉梦人生
    2020-12-07 04:32

    can you please explain to me what is going on here?

    Get hold of the first (or maybe the second, I know it isn't in the third) edition of "Mastering Regular Expressions". This works through the RFC defining valid email addresses, and builds the regex needed.

提交回复
热议问题