Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我可以知道如何在 php 中使用正则表达式仅批准字母 az、AZ 和数字 0-9 和特殊字符 $!. 吗?
preg_match("/^[a-zA-Z0-9$!\.\,]{1,100}$/", $name);
这里出了什么问题?
从我的头顶上掉下来
if (preg_match('/^[^a-z\d\$!\.,]$/i', $string)){ // fail }