Different email regex's

Discussion in 'Visual Basic .NET' started by andee, Jun 7, 2011.

  1. andee

    andee Regular Member

    Joined:
    Jul 24, 2010
    Messages:
    218
    Likes Received:
    83
    I tried in vain to create different regex's for different ways people type emails in order to obfusicate them a little ie

    jmprice22 at gmail dot com
    kathypease(at)gmail(dot)com
    catamorg(at) gmail (dot) com

    Has anyone got any regular expressions that match any of the email types above ?
     
  2. andee

    andee Regular Member

    Joined:
    Jul 24, 2010
    Messages:
    218
    Likes Received:
    83
    okay if anyones curious some of these will match

    Code:
    ([A-Za-z0-9_\+\.]+) at (\w+) dot (\w+)
    
    [A-Za-z0-9_\+\.]+) at.*?com
    
    \S+\s*[[{_-]*[aA][tT][]}_-]*\s*\S+\s*[[{_-]*[dD][oO][tT][]}_-]*\s*\S+

    also good site to test them on is regexhero dooot net

    lol cant post links how ironic
     
    Last edited: Jun 10, 2011