Advertisement:

Author Topic: Can you help me with this regular expression?  (Read 19966 times)

Offline x-y-z

  • Newbie
  • *
  • Posts: 1
Can you help me with this regular expression?
« on: November 13, 2008, 02:23:31 PM »
Hi guys, can anyone help me explain this RE used in preg_match function?
It's used for validating email

if(!preg_match("/^[^\\s()<>@,;:\\\"\\/\\[\\]?=]+@\\w[\\w-]*(\\.\\w[\\w-]*)*\\.[a-z]{2,}$/i",$memberEmail)){
      $invalid ="memberEmail is not valid email";

Thanks before!!  :D