regex extract email from strings

前端 未结 7 1474
陌清茗
陌清茗 2020-12-01 16:25

I want to know if by using regular expressions I am able to extract emails from the following strings?

The following RE pattern is .*@.*match with all st

7条回答
  •  隐瞒了意图╮
    2020-12-01 16:58

    I would like to add to @Ambrish Pathak's answer,

    According to wikipedia, an email address can also accept + sign

    ([a-zA-Z0-9+._-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9_-]+)
    

    will work like a charm

提交回复
热议问题