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

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

WBOY
Release: 2016-06-13 13:41:45
Original
1273 people have browsed it

帮忙写个很简单的正则,谢谢了..就是将*.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>
Copy after login
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