Home > Backend Development > PHP Tutorial > 正则解决方法

正则解决方法

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-13 13:06:03
Original
814 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:
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
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template