Home > Backend Development > PHP Tutorial > php 正则如何匹配“/”,网络上只有匹配“”的

php 正则如何匹配“/”,网络上只有匹配“”的

WBOY
Release: 2016-06-23 14:26:30
Original
1081 people have browsed it

php 正则如何匹配“/”,网络上只有匹配“\”的


回复讨论(解决方案)

加反斜杠转义  "\/"

/\//   -->和分界符相同,所以要转义

#/#   -->和分界符不同,所以不需要转义

加反斜杠转义  "\/" 试过了,没用

/\//   -->和分界符相同,所以要转义

#/#   -->和分界符不同,所以不需要转义
谢谢了,我用了##当分界符,我以为只有//当分界符

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