如何用PHP来过滤输入的内容中包含的元字符

WBOY
Release: 2016-06-13 13:42:44
Original
1247 people have browsed it

怎么用PHP来过滤输入的内容中包含的元字符
怎么用PHP来过滤输入的内容中包含的元字符

------解决方案--------------------
需要过滤什么元字符使用\来解决 例如 '/\?+/',$str


------解决方案--------------------
洒家对此极为擅长。洒家来助你。
好汉,你要实现何功能?

正则表达式
()
贪婪.*
不贪婪.*?
安行u
区分大小写i



查找用preg_match(正则,目标,结果仍一数组)
替换用preg_replace(正则,目标,源)

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!