Home >Backend Development >PHP Tutorial >正则表达式,求帮忙!该怎么解决

正则表达式,求帮忙!该怎么解决

WBOY
WBOYOriginal
2016-06-13 10:10:28796browse

正则表达式,求帮忙!!!
想求助一下2个正则表达式的写法。。。


匹配字符串中包含数字(允许有特殊字符,如“-”)

匹配字符串中包含字母(允许有特殊字符,如“-”)



我是小白,先谢了!

------解决方案--------------------
不是你的正则不对,而是+号在属于url的特殊字符,你直接打印print_r($_SERVER),看QUERY_STRING或者REQUEST_URI

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn