What is wrongwith this pregmatch for email

Discussion in 'PHP' started by Cinta April, Apr 30, 2008.

  1. #1
    (!preg_match('/^[a-z0-9&\'\.\-_\+]+@[a-z0-9\-]+\.([a-z0-9\-]+\.)*+[a-z]{2}/is', $email))

    hi I got this code from the internet but it seems that there is a flaw.

    myname@example.c'om

    escape this match

    what is the correct code?
     
    Cinta April, Apr 30, 2008 IP
  2. graham23s

    graham23s Well-Known Member

    Messages:
    188
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    105
    #2
    i use:

    Graham
     
    graham23s, Apr 30, 2008 IP