首页  >  文章  >  后端开发  >  正则匹配任意字母但不包括.

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

WBOY
WBOY原创
2016-06-23 14:00:321580浏览

正则匹配任意字母但不包括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)

声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn