这个正则啥意思?

WBOY
Release: 2016-06-23 14:10:26
Original
864 people have browsed it

 /\.(google|youdao)(\.[a-z0-9\-]+){1,2}\//ig;

这个正则啥意思


回复讨论(解决方案)

速度速度速度速度

php 的正则没用 g 修饰符,所以这是 js 的正则
g 表示全程,在 String.replace 方法中表示替换所有的匹配项

匹配google或者youdao的域名。

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