php正则校验用户名介绍

网络编程 发布日期:2025/6/20 浏览次数:1

正在浏览:php正则校验用户名介绍
<?php 

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


?>