Home  >  Article  >  Backend Development  >  正则

正则

WBOY
WBOYOriginal
2016-06-13 13:36:441117browse

求一个正则
求一个正则 值替换字符串中的 双引号和单引号!并求一个正则测试工具!

------解决方案--------------------
str_replace不就行了吗
如果正则
'/"|\'/' 就行了,/"|"|\'/所谓哪般?
------解决方案--------------------

PHP code

preg_replace('/"|\'/', '', $str)
<br><font color="#e78608">------解决方案--------------------</font><br>Mark,自己也刚开始学PHP,学习一下。
<br><font color="#e78608">------解决方案--------------------</font><br>regexbuilder <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