【PHP基础】记php正则约束输入汉字、字母、数字过滤表达式

1、php基础:记php正则约束输入汉字、字母、数字过滤表达式

        if (! preg_match('/^[\x7f-\xffa-zA-Z0-9]{1,40}$/', $short_name)) {
            //S::error(70179);
            return '简称在13个汉字或40个数字、英文内';
        }

 

posted @ 2023-03-06 09:05  PHP急先锋  阅读(64)  评论(0编辑  收藏  举报