Home > Backend Development > PHP Tutorial > preg_match,该如何处理

preg_match,该如何处理

WBOY
Release: 2016-06-13 13:14:23
Original
1101 people have browsed it

preg_match
preg_match('~^/(\.[^/]+)[/]{0,1}~', 不知道~这个符号是什么作用?

------解决方案--------------------
php 正则表达式需要用分界符括起来,分隔符可以是除下列字符以外的其他字符:字母或数字,反斜杠,空白字符

常用的分隔符有:斜杠(/,forward slash),井号(#,hash sign)和波浪号(~,tilde)。..

建议系统的去学习下正则吧.
------解决方案--------------------
对于正则表达式,至少需要看一下手册的
web开发涉及的各种语言的手册中都有关于正则表达式的描述

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