一段PHP正则的不解,该如何解决

WBOY
Release: 2016-06-13 13:33:36
Original
859 people have browsed it

一段PHP正则的不解

PHP code
<!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

-->
$zz2="/\/is";
$text=preg_replace($zz2,"",$text);

Copy after login

阅读这段"去掉图片链接"的PHP代码,
下面是对代码的一些不解:
1. 开头处 \2.后面已经有is指明不区分大小写了,前面还有必要用组合来区分(a|A)大小写吗?

------解决方案--------------------
这段正则写的太过冗长,你的理解是正确的
------解决方案--------------------
1: 加与不加都可以。
2:没有必要了。写一个即可。
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