正则解决方法

WBOY
Release: 2016-06-13 10:54:22
Original
956 people have browsed it

正则
php 截取中文 $str='{,watch,:表壳、套装}'; 结果为:表壳、套装 求一正则??

------解决方案--------------------

PHP code
preg_match_all('/[\x{4e00}-\x{9fa5}]+/u',$str,$m);print_r($m[0]);<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