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.
我想允许这种文件名类型:
AZ 字母 az 字母 1-x 数字 特殊字符:"(" ")" "-"
如果您可以帮助我处理 preg_match 规则,我尝试过但没有成功。
<?php $filename = "A-("; if(preg_match("/^[A-Za-z0-9-\(\)]+$/", $filename)) { echo "matched"; }