Php 警告preg_match():编译失败:在偏移量33处没有要重复的内容

Php 警告preg_match():编译失败:在偏移量33处没有要重复的内容,php,validation,Php,Validation,我想验证我添加到PHP中使用的电子邮件。为此,我使用以下功能: function checkEmail($email) { if(preg_match("/^([a-zA-Z0-9])+([a-zA-Z0-9\._-])↪*@([a-zA-Z0-9_-])+([a-zA-Z0-9\._-]+)+$/",$email)){ list($username, $domain) = split('@', $email); if(!checkdnsrr($domain, 'MX'))

我想验证我添加到PHP中使用的电子邮件。为此,我使用以下功能:

function checkEmail($email) {
  if(preg_match("/^([a-zA-Z0-9])+([a-zA-Z0-9\._-])↪*@([a-zA-Z0-9_-])+([a-zA-Z0-9\._-]+)+$/",$email)){
    list($username, $domain) = split('@', $email);
    if(!checkdnsrr($domain, 'MX')) {
      return false;
    }
    return true;
  }
}
但是,现在它返回以下警告:

preg_match(): Compilation failed: nothing to repeat at offset 33

如何解决此问题?

为什么
preg\u match
,而您可以使用PHP中的
过滤器\u验证\u电子邮件
来解决此问题

if(filter_var($email, FILTER_VALIDATE_EMAIL))

什么是“↪" 在ReXEP的中间?它不应该在那里。尝试删除字符。让我猜一下:你复制粘贴的字面意思是从一些站点,包括他们用来突出他们的代码的“断线”可视化工具……请不要使用<代码>分裂< /代码>永远-它被贬低。你想要<代码>爆炸< /代码>。