News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Can you help me with this regular expression?

Started by x-y-z, November 13, 2008, 02:23:31 PM

Previous topic - Next topic

x-y-z

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

Advertisement: