XH1Q8335军绿

WBOY
Release: 2016-06-23 14:02:46
Original
834 people have browsed it

怎么用正则将XH1Q8335军绿 分开  XH1Q8335    军绿  两部分


回复讨论(解决方案)

不需要用正则吧,用str_replace('军绿','    军绿','XH1Q8335军绿');

或者:str_replace('XH1Q8335军绿','XH1Q8335    军绿',$str);

或者:str_replace('XH1Q8335军绿','XH1Q8335    军绿',$str);
 
我要是把汉字和其他字符分开.  你这是死方法

$s = 'XH1Q8335军绿';preg_match('/(\w+)(\W+)/', $s, $r);print_r($r);
Copy after login
Array ( [0] => XH1Q8335军绿 [1] => XH1Q8335 [2] => 军绿 ) 

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