Home  >  Article  >  Backend Development  >  帮忙写个很简单的正则,多谢了.就是将*32199.net匹配到www.32199.net/

帮忙写个很简单的正则,多谢了.就是将*32199.net匹配到www.32199.net/

WBOY
WBOYOriginal
2016-06-13 10:08:02880browse

帮忙写个很简单的正则,谢谢了..就是将*.32199.net匹配到www.32199.net/*
帮忙写个很简单的正则,谢谢了..就是将*.32199.net匹配到www.32199.net/*
谢谢了..
*代表任意的字符..

------解决方案--------------------
什么意思? 替换? 还是url 重写
------解决方案--------------------
很简单 参考下http://liangfen1224.blog.163.com/blog/static/72377647201138115011897/
------解决方案--------------------

XML code
RewriteRule ^(.*).32199.net$ www.32199.net/$1<br><font color="#e78608">------解决方案--------------------</font><br>写在httpd.cof别忘了重启apache啊<br><font color="#e78608">------解决方案--------------------</font><br>$str1=http:\/\/www.32199.net/index.html<br>标记;<br><br>$pm1='@^(.*).32199.net/(.*)@';<br><br>if(preg_match($pm1,$str1))<br>{<br>	echo '1.找到了<br>';<br>}<br>else<br>{<br>	echo '1.找不到<br>';<br>}<br><br><br>---------------<br>结果我找到了...<div class="clear">
                 
              
              
        
            </div>
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