Ruby Email validation with regex

前端 未结 9 900
有刺的猬
有刺的猬 2020-12-03 00:21

I have a large list of emails I am running through. A lot of the emails have typos. I am trying to build a string that will check valid emails.

this is what I have

9条回答
  •  失恋的感觉
    2020-12-03 00:53

    try this!!!

    /\[A-Z0-9._%+-\]+@\[A-Z0-9.-\]+\.\[AZ\]{2,4}/i

    only email string selected

    "Robert Donhan" sadfadf
    Robert Donhan 
    "Robert Donhan" abc.bob@email.comasdfadf
    Robert Donhan bob@email.comadfd
    

提交回复
热议问题