Looking for a regex to match a gmail plus address

前端 未结 7 1501
梦如初夏
梦如初夏 2021-01-25 08:25

Im using this currently :

/^(.*)\\+(.*)@gmail.com/

(I\'m capturing the text before and after the plus sign in a group)

and it works in most

7条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-25 08:59

    You are not properly detecting the +. Use something like this: ^([^+]+)[+]+([^+]+)@gmail.com

提交回复
热议问题