Home > Backend Development > PHP Tutorial > 怎么去除字符串中非汉字、非字母、非数字的字符

怎么去除字符串中非汉字、非字母、非数字的字符

WBOY
Release: 2016-06-13 11:49:06
Original
1589 people have browsed it

如何去除字符串中非汉字、非字母、非数字的字符?
如何去除字符串中非汉字、非字母、非数字、非常见标点符号(逗号,句号,反斜杠)的所有字符

引用
如:4/13の困扰(☀,∴…3???...?三Ⅲ) ??爱我中华= =扬我国威【转】

过滤后:4/13困扰9728爱我中华 扬我国威转

------解决方案--------------------
你意思是只要数字英文字母喽?
preg_match("/^[a-z0-9]+[^_]$/g",$a);没测 手写. 自己看下类库
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