我在使用正则表达式方面遇到了一些麻烦.
这是我的代码
$pattern = "^([0-9]+)$"; if (preg_match($pattern, $input)) echo "yes"; else echo "nope";
我跑了然后得到:
警告:preg_match()[function.preg-match]:找不到结尾分隔符'^'
php regex pcre preg-match
pcre ×1
php ×1
preg-match ×1
regex ×1