当前位置:首页 >> 网络编程

php正则校验用户名介绍

<?php 

if (mb_ereg("^[\w\-\.]{1,32}$", $str)) { 
echo 'yes'; 
} else { 
echo 'no'; 


?>