【www.gdgbn.com--邮件】

php 邮件验证与图片正则表式程序

function emailcheck($email)
{
 $ret = false;

 if(strstr($email, "@") && strstr($email, "."))
 {
  if(preg_match("/^([_a-z0-9]+([._a-z0-9-]+)*)@([a-z0-9]{1,}(.[a-z0-9-]{2,})*.[a-z]{2,4})$/i", $email))
   $ret = true;
  if(strlen($email) < "8" || strlen($email) > "80")
   $ret = false;
 }

 return $ret;
}


preg_match_all("/[img](.+?)[/img]/is", $str, $img);

preg_match_all("/[video](.+?)[/video]/is", $str, $video);

本文来源:http://www.gdgbn.com/jsp/22686/