Home > Backend Development > PHP Tutorial > 正则匹配任意字母但不包括.

正则匹配任意字母但不包括.

WBOY
Release: 2016-06-23 14:00:32
Original
1635 people have browsed it

正则匹配任意字母但不包括about,help,conect 


回复讨论(解决方案)

$str = "正则匹配任意字母但不包括about,help,conect";if(preg_match("/about|help|conect/is", $str,$match)){	echo '字符串中存在'.$match[0].'字段';}
Copy after login

正则匹配任意字母但不包括about,help,conect 

不是这样的啊 

我要做伪静态 要纯正则来匹配啊 RewriteRule  /(任意字母不包括help|about|contect).html

RewriteCond $1 !^(help\.html|about\.html|contect\.html)

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