Home > Backend Development > PHP Tutorial > 【正则表达式有关问题】如何匹配单独(两端非空格)的2个空格

【正则表达式有关问题】如何匹配单独(两端非空格)的2个空格

WBOY
Release: 2016-06-13 10:24:28
Original
1276 people have browsed it

【正则表达式问题】怎么匹配单独(两端非空格)的2个空格


比如: aa--bb 这样的匹配两个空格,aa----bb这样的不匹配。

注释: “-”表示一个空格

------解决方案--------------------
这个意思?

PHP code
$s = <font color="#e78608">------解决方案--------------------</font><br>echo preg_replace('/(?');<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