Looking for a regex to match a gmail plus address

前端 未结 7 1402
梦如初夏
梦如初夏 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 09:00

    I think this can be simplified a touch:

    IF you know the address you're looking for and want to match your address regardless of whether it has a 'plus' tag on it:

    bignev(\+.*)*@gmail.com
    

    If you only want the ones with the 'plus' tag:

    bignev(\+.*)@gmail.com
    

    If you have your own domain:

    bignev(\+.*)*@everton.com
    

    Or to answer the original post specifically:

    .*(\+.*)@gmail.com
    
    0 讨论(0)
提交回复
热议问题