我想改变preg_match检查从URL检查到用户名检查是最小/最大2-16chrs,破折号,空间& hypen可以接受。我得到这个错误警告:preg_match()[function.preg-match]:编译失败:没有重复的偏移量
警告:的preg_match()[function.preg匹配]:编译失败:没有重复的偏移量为14
if(empty($string) || preg_match("#^([\w- ]{2,16}*(?:.[\w- ]{2,16}*)+):?(d+)?/?#i", $string))
旧代码,寻找URL
if(empty($string) || preg_match("#^(http|https|ftp)://([A-Z0-9][A-Z0-9_-]*(?:.[A-Z0-9][A-Z0-9_-]*)+):?(d+)?/?#i", $string))