首页
/
每日頭條
/
科技
/
如何測試賬号類型
如何測試賬号類型
更新时间:2025-01-19 11:37:35

如何測試賬号類型?作為碼農,經常遇見各種離奇的用戶,比如注冊賬号老是有各種特殊符号,下面給大家過濾一下,去除非數學,,今天小編就來聊一聊關于如何測試賬号類型?接下來我們就一起去研究一下吧!

如何測試賬号類型(注冊賬号過濾特殊字符)1

如何測試賬号類型

作為碼農,經常遇見各種離奇的用戶,比如注冊賬号老是有各種特殊符号,下面給大家過濾一下,去除非數學,

$username = preg_replace('/[^\d]*/','',$username);

去除任何空白字符,包括空格、制表符、換頁符等等

$username = preg_replace('/[^\S]*/,'',$username);

,
Comments
Welcome to tft每日頭條 comments! Please keep conversations courteous and on-topic. To fosterproductive and respectful conversations, you may see comments from our Community Managers.
Sign up to post
Sort by
Show More Comments
Copyright 2023-2025 - www.tftnews.com All Rights Reserved