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

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

WBOY
WBOYOriginal
2016-06-23 14:26:301035browse

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


回复讨论(解决方案)

加反斜杠转义  "\/"

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

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

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

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

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

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