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

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

WBOY
WBOYOriginal
2016-06-23 14:00:321578browse

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


回复讨论(解决方案)

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

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

不是这样的啊 

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

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

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